diff options
author | 2010-10-18 17:01:31 -0700 | |
---|---|---|
committer | 2010-10-19 14:34:09 -0700 | |
commit | 8f39c64bf10f0427dbc50030062f501162b80689 (patch) | |
tree | 0eedcff62047186ea6a3d895ace2a95888549791 | |
parent | 80f54ad9e8e9b3e6de3bfa27e3af0a8c5724a4dd (diff) |
Fix activated state in holo theme.
The background showing the activated state needs to be a
state list so it can change. Also remove the new default
drawable in the selector that appeared, since it is redundant
with the original default of being transparent.
Change-Id: I90b23883af73da05e4b314725ef6a8e374019565
-rw-r--r-- | core/res/res/drawable/activated_background_holo_dark.xml | 20 | ||||
-rw-r--r-- | core/res/res/drawable/activated_background_holo_light.xml | 20 | ||||
-rw-r--r-- | core/res/res/drawable/list_selector_background.xml | 1 | ||||
-rw-r--r-- | core/res/res/drawable/list_selector_background_light.xml | 1 | ||||
-rw-r--r-- | core/res/res/drawable/list_selector_holo_dark.xml | 1 | ||||
-rw-r--r-- | core/res/res/drawable/list_selector_holo_light.xml | 1 | ||||
-rw-r--r-- | core/res/res/values/styles.xml | 1 | ||||
-rw-r--r-- | core/res/res/values/themes.xml | 4 |
8 files changed, 43 insertions, 6 deletions
diff --git a/core/res/res/drawable/activated_background_holo_dark.xml b/core/res/res/drawable/activated_background_holo_dark.xml new file mode 100644 index 000000000000..f71235e7d99a --- /dev/null +++ b/core/res/res/drawable/activated_background_holo_dark.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_activated="true" android:drawable="@android:drawable/list_selector_activated_holo_dark" /> + <item android:drawable="@color/transparent" /> +</selector> diff --git a/core/res/res/drawable/activated_background_holo_light.xml b/core/res/res/drawable/activated_background_holo_light.xml new file mode 100644 index 000000000000..615033d35c3b --- /dev/null +++ b/core/res/res/drawable/activated_background_holo_light.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_activated="true" android:drawable="@android:drawable/list_selector_activated_holo_light" /> + <item android:drawable="@color/transparent" /> +</selector> diff --git a/core/res/res/drawable/list_selector_background.xml b/core/res/res/drawable/list_selector_background.xml index 0a511528a145..6fb0661507dc 100644 --- a/core/res/res/drawable/list_selector_background.xml +++ b/core/res/res/drawable/list_selector_background.xml @@ -24,6 +24,5 @@ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" /> <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" /> <item android:state_focused="true" android:drawable="@drawable/list_selector_background_focused" /> - <item android:drawable="@drawable/list_selector_background_default" /> </selector> diff --git a/core/res/res/drawable/list_selector_background_light.xml b/core/res/res/drawable/list_selector_background_light.xml index 9b7980c60062..4da7e2114e1e 100644 --- a/core/res/res/drawable/list_selector_background_light.xml +++ b/core/res/res/drawable/list_selector_background_light.xml @@ -24,6 +24,5 @@ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition_light" /> <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition_light" /> <item android:state_focused="true" android:drawable="@drawable/list_selector_background_focused_light" /> - <item android:drawable="@drawable/list_selector_background_default_light" /> </selector> diff --git a/core/res/res/drawable/list_selector_holo_dark.xml b/core/res/res/drawable/list_selector_holo_dark.xml index 3456e1e5b5ac..9cc993a9ccaf 100644 --- a/core/res/res/drawable/list_selector_holo_dark.xml +++ b/core/res/res/drawable/list_selector_holo_dark.xml @@ -24,5 +24,4 @@ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" /> <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" /> <item android:state_focused="true" android:drawable="@drawable/list_selector_focused_holo_dark" /> - <item android:drawable="@drawable/list_selector_focused_holo_dark" /> </selector> diff --git a/core/res/res/drawable/list_selector_holo_light.xml b/core/res/res/drawable/list_selector_holo_light.xml index 2dc39f6059ad..f2def40e0757 100644 --- a/core/res/res/drawable/list_selector_holo_light.xml +++ b/core/res/res/drawable/list_selector_holo_light.xml @@ -24,6 +24,5 @@ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" /> <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" /> <item android:state_focused="true" android:drawable="@drawable/list_selector_focused_holo_light" /> - <item android:drawable="@drawable/list_selector_focused_holo_light" /> </selector> diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index 2ecb4d0c3e98..d180ed5c316a 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -577,6 +577,7 @@ <!-- Default style for {@link android.app.FragmentBreadCrumbs} view. --> <style name="Widget.FragmentBreadCrumbs"> <item name="android:padding">4dp</item> + <item name="android:animateLayoutChanges">true</item> </style> <style name="Widget.KeyboardView" parent="android:Widget"> diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index d7954a769b00..88dd862c4781 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -706,7 +706,7 @@ <item name="listChoiceBackgroundIndicator">@android:drawable/list_selector_holo_dark</item> - <item name="activatedBackgroundIndicator">@android:drawable/list_selector_activated_holo_dark</item> + <item name="activatedBackgroundIndicator">@android:drawable/activated_background_holo_dark</item> <item name="listDividerAlertDialog">@android:drawable/divider_horizontal_holo_dark</item> @@ -936,7 +936,7 @@ <item name="listChoiceBackgroundIndicator">@android:drawable/list_selector_holo_light</item> - <item name="activatedBackgroundIndicator">@android:drawable/list_selector_activated_holo_light</item> + <item name="activatedBackgroundIndicator">@android:drawable/activated_background_holo_light</item> <item name="expandableListPreferredItemPaddingLeft">40dip</item> <item name="expandableListPreferredChildPaddingLeft"> |