diff --git a/api/current.xml b/api/current.xml index a57ba84da37b8..f0a98102ec5f4 100644 --- a/api/current.xml +++ b/api/current.xml @@ -2242,6 +2242,17 @@ visibility="public" > + + + + + + + + + + + + + + + + + + = android.os.Build.VERSION_CODES.HONEYCOMB) { + child.setActivated(mCheckStates.get(position)); } } diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java index f9bdc43c44ec7..e5a34e85b855e 100644 --- a/core/java/android/widget/ListView.java +++ b/core/java/android/widget/ListView.java @@ -1785,6 +1785,9 @@ public class ListView extends AbsListView { if (mChoiceMode != CHOICE_MODE_NONE && mCheckStates != null) { if (child instanceof Checkable) { ((Checkable) child).setChecked(mCheckStates.get(position)); + } else if (getContext().getApplicationInfo().targetSdkVersion + >= android.os.Build.VERSION_CODES.HONEYCOMB) { + child.setActivated(mCheckStates.get(position)); } } diff --git a/core/res/res/drawable/activated_background.xml b/core/res/res/drawable/activated_background.xml new file mode 100644 index 0000000000000..d92fba122fc85 --- /dev/null +++ b/core/res/res/drawable/activated_background.xml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/core/res/res/drawable/activated_background_light.xml b/core/res/res/drawable/activated_background_light.xml new file mode 100644 index 0000000000000..5d5681d5f0386 --- /dev/null +++ b/core/res/res/drawable/activated_background_light.xml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/core/res/res/layout/preference_list_item.xml b/core/res/res/layout/preference_header_item.xml similarity index 94% rename from core/res/res/layout/preference_list_item.xml rename to core/res/res/layout/preference_header_item.xml index 3b888b4ae86a5..80a3ac2a70583 100644 --- a/core/res/res/layout/preference_list_item.xml +++ b/core/res/res/layout/preference_header_item.xml @@ -14,12 +14,12 @@ limitations under the License. --> - + diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index cda997a44f0d3..2ede9f04c0200 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -151,6 +151,9 @@ + + + @@ -3104,6 +3107,7 @@
  • "state_last"
  • "state_only"
  • "state_pressed" +
  • "state_activated"
  • "state_error"
  • "state_circle"
  • "state_rect" @@ -3111,23 +3115,35 @@
  • "state_move" --> - + - + - + - + - + - + + + + + @@ -3138,8 +3154,6 @@ - - @@ -3147,6 +3161,7 @@ + diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 86e5579815921..79040b88a9f52 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1346,6 +1346,8 @@ + + @@ -1354,12 +1356,6 @@ - - - - - - + + + + + + + + + @@ -1375,9 +1380,6 @@ - - - - + diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index 8a9ebf0a04f0a..70daee84d24cd 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -97,6 +97,8 @@ @android:drawable/list_selected_background + @android:drawable/activated_background + 40dip ?android:attr/expandableListPreferredItemPaddingLeft @@ -272,6 +274,8 @@ ?android:attr/textColorPrimary @android:drawable/list_selected_background_light + @android:drawable/activated_background_light + @android:style/Widget.PopupWindow @android:drawable/indicator_check_mark_light