</item>
<item android:left="1dp" android:top="1dp" android:bottom="1dp">
<shape android:shape="rectangle" >
- <solid android:color="@android:color/white" />
+ <solid android:color="@android:color/background_light" />
</shape>
</item>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item>
+ <shape android:shape="rectangle" >
+ <solid android:color="@android:color/darker_gray" />
+ </shape>
+ </item>
+ <item android:left="1dp" android:top="1dp" android:bottom="1dp">
+ <shape android:shape="rectangle" >
+ <solid android:color="@android:color/background_dark" />
+ </shape>
+ </item>
+
+</layer-list>
\ No newline at end of file
</item>
<item android:left="1dp" android:right="1dp" android:top="1dp" android:bottom="1dp">
<shape android:shape="rectangle" >
- <solid android:color="@android:color/white" />
+ <solid android:color="@android:color/background_light" />
</shape>
</item>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item>
+ <shape android:shape="rectangle" >
+ <solid android:color="@android:color/darker_gray" />
+ </shape>
+ </item>
+ <item android:left="1dp" android:right="1dp" android:top="1dp" android:bottom="1dp">
+ <shape android:shape="rectangle" >
+ <solid android:color="@android:color/background_dark" />
+ </shape>
+ </item>
+
+</layer-list>
\ No newline at end of file
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:background="@color/list_content_background" >
+ android:background="?attr/listContentBackground" >
<ImageView
android:id="@+id/watermark"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_weight="1"
- android:background="@drawable/list_content_left"
+ android:background="?attr/listItemsLeftBackground"
android:orientation="vertical" >
<ListView
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="@dimen/golden_ratio"
- android:background="@drawable/list_content_right"
+ android:background="?attr/listItemsRightBackground"
android:orientation="vertical" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:minHeight="64dp"
+ android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal" >
<View
android:layout_height="match_parent"
android:background="?android:attr/activatedBackgroundIndicator" />
- <include layout="@layout/list_item_base" />
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingBottom="8dip"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingTop="8dip" >
+
+ <include layout="@layout/list_item_base" />
+ </LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:minHeight="64dp"
- android:orientation="horizontal" >
+<merge xmlns:android="http://schemas.android.com/apk/res/android" >
<ImageView
android:id="@+id/image"
- android:layout_width="48dp"
- android:layout_height="32dp"
+ android:layout_width="@android:dimen/app_icon_size"
+ android:layout_height="@android:dimen/app_icon_size"
android:layout_gravity="center_vertical"
- android:layout_marginLeft="@dimen/section_padding"
android:scaleType="fitCenter" >
</ImageView>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:layout_margin="@dimen/section_padding"
android:focusable="false"
android:focusableInTouchMode="false" />
-</LinearLayout>
\ No newline at end of file
+</merge>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingTop="8dip"
+ android:paddingBottom="8dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:minHeight="64dp"
+ android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal" >
<include layout="@layout/list_item_base" />
<ImageView
android:id="@+id/image"
- android:layout_width="48dp"
- android:layout_height="32dp"
+ android:layout_width="@android:dimen/app_icon_size"
+ android:layout_height="@android:dimen/app_icon_size"
android:layout_gravity="center_vertical"
- android:layout_marginLeft="@dimen/section_padding"
android:scaleType="fitCenter" >
</ImageView>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:layout_margin="@dimen/section_padding"
android:focusable="false"
android:focusableInTouchMode="false" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:minHeight="64dp"
- android:orientation="horizontal" >
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:orientation="horizontal"
+ android:paddingBottom="8dip"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingTop="8dip" >
<include layout="@layout/list_item_base" />
--- /dev/null
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <!--
+ Base application theme for API 14+. This theme completely replaces
+ AppBaseTheme from BOTH res/values/styles.xml and
+ res/values-v11/styles.xml on API 14+ devices.
+ -->
+ <style name="AppBaseTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
+ <!-- API 14 theme customizations can go here. -->
+ </style>
+
+ <style name="AppBaseDarkTheme" parent="android:Theme.Holo">
+ <!-- API 14 theme customizations can go here. -->
+ </style>
+
+</resources>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <attr name="listContentBackground" format="reference|color" />
+ <attr name="listItemsLeftBackground" format="reference|color" />
+ <attr name="listItemsRightBackground" format="reference|color" />
+
+</resources>
\ No newline at end of file
<color name="holo_blue_light">#ff33b5e5</color>
<color name="holo_blue_dark">#ff0099cc</color>
<color name="holo_blue_bright">#ff00ddff</color>
- <color name="list_content_background">#f1f1f1</color>
<color name="holo_red_light">#ffff4444</color>
<color name="holo_red_dark">#ffcc0000</color>
-
+
+ <color name="list_separator">#f1f1f1</color>
</resources>
\ No newline at end of file
<item type="dimen" name="golden_ratio">1.6180339887498948482</item>
<dimen name="content_padding">0dp</dimen>
- <dimen name="section_padding">4dp</dimen>
+ <dimen name="section_padding">8dp</dimen>
<dimen name="list_horizontal_margin">0dp</dimen>
<dimen name="list_vertical_margin">0dp</dimen>
--- /dev/null
+<resources>
+
+ <!--
+ Base application theme, dependent on API level. This theme is replaced
+ by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+ -->
+ <style name="AppBaseTheme" parent="@android:style/Theme.Light">
+ <!--
+ Theme customizations available in newer API levels can go in
+ res/values-vXX/styles.xml, while customizations related to
+ backward-compatibility can go here.
+ -->
+ </style>
+
+ <!-- Application theme. -->
+ <style name="AppTheme" parent="AppBaseTheme">
+
+ <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+ <item name="listContentBackground">#f1f1f1</item>
+ <item name="listItemsLeftBackground">@drawable/list_content_left</item>
+ <item name="listItemsRightBackground">@drawable/list_content_right</item>
+ </style>
+
+ <style name="AppBaseDarkTheme" parent="android:Theme.Black"></style>
+
+ <!-- Application theme. -->
+ <style name="AppDarkTheme" parent="AppBaseDarkTheme">
+
+ <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+ <item name="listContentBackground">#0f0f0f</item>
+ <item name="listItemsLeftBackground">@drawable/list_content_left_dark</item>
+ <item name="listItemsRightBackground">@drawable/list_content_right_dark</item>
+ </style>
+
+</resources>
\ No newline at end of file
}
return false;
}
-
- @Override
- void onListItemClick(ListItem li) {
- super.onListItemClick(li);
-// if (mContentAdapter == null)
-// return;
-//
-// setContent(mContentAdapter.getFragment(li, mCurrentContent));
- }
@Override
protected int getListItemResource() {
super.onConfigurationChanged(newConfig);
setPadding();
}
-//
-// ListContentAdapter mContentAdapter;
-// public ListContentAdapter getContentAdapter() {
-// return mContentAdapter;
-// }
-//
-// public void setContentAdapter(ListContentAdapter adapter) {
-// mContentAdapter = adapter;
-// }
}
android:name=".MainActivityDark"
android:theme="@style/AppDarkTheme" />
<activity
- android:name=".ListContentTest"/>
+ android:name=".ListContentTest" />
</application>
</manifest>
\ No newline at end of file
public static final int list_content_container = 0x7f080000;
public static final int listview = 0x7f080004;
}
+ public static final class style {
+ public static final int AppBaseDarkTheme = 0x7f060002;
+ public static final int AppDarkTheme = 0x7f060003;
+ public static final int AppBaseTheme = 0x7f060000;
+ public static final int AppTheme = 0x7f060001;
+ }
public static final class color {
- public static final int holo_red_light = 0x7f040004;
- public static final int list_content_background = 0x7f040003;
+ public static final int holo_red_light = 0x7f040003;
+ public static final int list_content_background = 0x7f040005;
public static final int holo_blue_bright = 0x7f040002;
public static final int holo_blue_light = 0x7f040000;
- public static final int holo_red_dark = 0x7f040005;
+ public static final int holo_red_dark = 0x7f040004;
public static final int holo_blue_dark = 0x7f040001;
}
public static final class layout {
public static final int list_fragment = 0x7f030002;
}
public static final class drawable {
- public static final int list_content_right = 0x7f020005;
+ public static final int list_content_right = 0x7f020006;
public static final int list_content_left = 0x7f020004;
}
+ public static final class attr {
+ public static final int listContentBackground = 0x7f010000;
+ public static final int listItemsLeftBackground = 0x7f010001;
+ }
public static final class dimen {
public static final int list_horizontal_margin = 0x7f050005;
public static final int golden_ratio = 0x7f050002;
public final class R {
public static final class attr {
+ /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
+or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
+<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
+"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
+ */
+ public static final int listContentBackground=0x7f010000;
+ /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
+or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
+<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
+"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
+ */
+ public static final int listItemsLeftBackground=0x7f010001;
+ /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
+or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
+<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
+"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
+ */
+ public static final int listItemsRightBackground=0x7f010002;
}
public static final class color {
public static final int holo_blue_bright=0x7f040002;
public static final int holo_blue_dark=0x7f040001;
public static final int holo_blue_light=0x7f040000;
- public static final int holo_red_dark=0x7f040005;
- public static final int holo_red_light=0x7f040004;
- public static final int list_content_background=0x7f040003;
+ public static final int holo_red_dark=0x7f040004;
+ public static final int holo_red_light=0x7f040003;
+ public static final int list_content_background=0x7f040005;
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
public static final int dropbox=0x7f020002;
public static final int ic_launcher=0x7f020003;
public static final int list_content_left=0x7f020004;
- public static final int list_content_right=0x7f020005;
- public static final int nexusone=0x7f020006;
+ public static final int list_content_left_dark=0x7f020005;
+ public static final int list_content_right=0x7f020006;
+ public static final int list_content_right_dark=0x7f020007;
+ public static final int nexusone=0x7f020008;
}
public static final class id {
public static final int checkbox=0x7f08000b;
public static final int list_item_selectable=0x7f030006;
}
public static final class string {
- public static final int app_name=0x7f060000;
- public static final int box=0x7f060005;
- public static final int cloud=0x7f060001;
- public static final int devices=0x7f060006;
- public static final int dropbox=0x7f060004;
- public static final int googledrive=0x7f060002;
- public static final int googledrive_summary=0x7f060003;
+ public static final int app_name=0x7f070000;
+ public static final int box=0x7f070005;
+ public static final int cloud=0x7f070001;
+ public static final int devices=0x7f070006;
+ public static final int dropbox=0x7f070004;
+ public static final int googledrive=0x7f070002;
+ public static final int googledrive_summary=0x7f070003;
}
public static final class style {
/** API 14 theme customizations can go here.
*/
- public static final int AppBaseDarkTheme=0x7f070002;
+ public static final int AppBaseDarkTheme=0x7f060002;
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
API 14 theme customizations can go here.
*/
- public static final int AppBaseTheme=0x7f070000;
+ public static final int AppBaseTheme=0x7f060000;
/** Application theme.
- All customizations that are NOT specific to a particular API-level can go here.
*/
- public static final int AppDarkTheme=0x7f070003;
+ public static final int AppDarkTheme=0x7f060003;
/** Application theme.
- All customizations that are NOT specific to a particular API-level can go here.
*/
- public static final int AppTheme=0x7f070001;
- public static final int RequestTheme=0x7f070004;
+ public static final int AppTheme=0x7f060001;
+ public static final int RequestTheme=0x7f060004;
}
}
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <!--
+<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
- -->
+
<style name="AppBaseTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
- <!-- API 14 theme customizations can go here. -->
+ API 14 theme customizations can go here.
</style>
<style name="AppBaseDarkTheme" parent="android:Theme.Holo">
- <!-- API 14 theme customizations can go here. -->
- </style>
+ API 14 theme customizations can go here.
+ </style> -->
</resources>
\ No newline at end of file
<resources>
- <!--
+<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
- -->
+
<style name="AppBaseTheme" parent="@android:style/Theme.Light">
- <!--
+
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
- -->
+
</style>
- <!-- Application theme. -->
+ Application theme.
<style name="AppTheme" parent="AppBaseTheme">
- <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+ All customizations that are NOT specific to a particular API-level can go here.
</style>
<style name="AppBaseDarkTheme" parent="android:Theme.Black">
</style>
- <!-- Application theme. -->
+ Application theme.
<style name="AppDarkTheme" parent="AppBaseDarkTheme">
- <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+ All customizations that are NOT specific to a particular API-level can go here.
</style>
-
+ -->
</resources>
\ No newline at end of file