diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-07-09 22:17:06 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-07-09 22:17:06 -0700 |
commit | 75e86f85947bbe0ebb7f48e3e0fb6a430e547ca7 (patch) | |
tree | 099b3d661577be7aa62558f7ccd301a7dd5be49c /res | |
parent | 109c35a36ed0d382664f7a57c83914137f701caf (diff) | |
download | dsub-75e86f85947bbe0ebb7f48e3e0fb6a430e547ca7.tar.gz dsub-75e86f85947bbe0ebb7f48e3e0fb6a430e547ca7.tar.bz2 dsub-75e86f85947bbe0ebb7f48e3e0fb6a430e547ca7.zip |
#376 Use the system selectable background for buttons
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable-hdpi/menubar_button_selected.9.png | bin | 302 -> 0 bytes | |||
-rw-r--r-- | res/drawable/actionbar_button.xml | 18 | ||||
-rw-r--r-- | res/drawable/btn_bg.xml | 17 | ||||
-rw-r--r-- | res/drawable/media_button.xml | 9 | ||||
-rw-r--r-- | res/drawable/menubar_button.xml | 14 | ||||
-rw-r--r-- | res/drawable/menubar_button_normal.xml | 4 | ||||
-rw-r--r-- | res/drawable/menubar_button_pressed.xml | 4 | ||||
-rw-r--r-- | res/layout/abstract_fragment_activity.xml | 2 | ||||
-rw-r--r-- | res/layout/album_cell_item.xml | 2 | ||||
-rw-r--r-- | res/layout/album_list_item.xml | 2 | ||||
-rw-r--r-- | res/layout/appwidget4x1.xml | 8 | ||||
-rw-r--r-- | res/layout/appwidget4x2.xml | 8 | ||||
-rw-r--r-- | res/layout/appwidget4x3.xml | 8 | ||||
-rw-r--r-- | res/layout/appwidget4x4.xml | 8 | ||||
-rw-r--r-- | res/layout/basic_list_item.xml | 2 | ||||
-rw-r--r-- | res/layout/complex_list_item.xml | 2 | ||||
-rw-r--r-- | res/layout/notification.xml | 6 | ||||
-rw-r--r-- | res/layout/notification_expanded.xml | 8 | ||||
-rw-r--r-- | res/layout/select_album_header.xml | 2 | ||||
-rw-r--r-- | res/layout/song_list_item.xml | 2 | ||||
-rw-r--r-- | res/layout/user_list_item.xml | 2 | ||||
-rw-r--r-- | res/values/styles.xml | 8 |
22 files changed, 35 insertions, 101 deletions
diff --git a/res/drawable-hdpi/menubar_button_selected.9.png b/res/drawable-hdpi/menubar_button_selected.9.png Binary files differdeleted file mode 100644 index d47bec40..00000000 --- a/res/drawable-hdpi/menubar_button_selected.9.png +++ /dev/null diff --git a/res/drawable/actionbar_button.xml b/res/drawable/actionbar_button.xml deleted file mode 100644 index 5445cdcb..00000000 --- a/res/drawable/actionbar_button.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - - <item - android:state_pressed="true" - android:drawable="@drawable/menubar_button_pressed" - /> - - <item - android:state_focused="true" - android:drawable="@drawable/menubar_button_pressed" - /> - - <item - android:drawable="@drawable/actionbar_button_normal" - /> - -</selector>
\ No newline at end of file diff --git a/res/drawable/btn_bg.xml b/res/drawable/btn_bg.xml deleted file mode 100644 index 79d40784..00000000 --- a/res/drawable/btn_bg.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2010 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" android:exitFadeDuration="@android:integer/config_mediumAnimTime">
-
- <item android:drawable="@color/ics_opaque" android:state_pressed="true"/>
- <item android:drawable="@color/ics_opaque" android:state_enabled="true" android:state_focused="true"/>
-
-</selector>
\ No newline at end of file diff --git a/res/drawable/media_button.xml b/res/drawable/media_button.xml deleted file mode 100644 index f144393d..00000000 --- a/res/drawable/media_button.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - - <item android:state_pressed="true" - android:drawable="@drawable/menubar_button_pressed"/> - - <item android:drawable="@drawable/menubar_button_normal"/> - -</selector>
\ No newline at end of file diff --git a/res/drawable/menubar_button.xml b/res/drawable/menubar_button.xml deleted file mode 100644 index 1dc79176..00000000 --- a/res/drawable/menubar_button.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - - <item android:state_pressed="true" - android:drawable="@drawable/menubar_button_pressed"/> - - <item android:state_enabled="true" - android:drawable="@drawable/menubar_button_normal"/> - - <item android:drawable="@drawable/menubar_button_selected"/> - -</selector> - -
\ No newline at end of file diff --git a/res/drawable/menubar_button_normal.xml b/res/drawable/menubar_button_normal.xml deleted file mode 100644 index 76589c0c..00000000 --- a/res/drawable/menubar_button_normal.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="@android:color/transparent" /> -</shape> diff --git a/res/drawable/menubar_button_pressed.xml b/res/drawable/menubar_button_pressed.xml deleted file mode 100644 index b7b42ee5..00000000 --- a/res/drawable/menubar_button_pressed.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <solid android:color="@color/dividerColor" />
-</shape>
diff --git a/res/layout/abstract_fragment_activity.xml b/res/layout/abstract_fragment_activity.xml index 605b988a..5f3a592b 100644 --- a/res/layout/abstract_fragment_activity.xml +++ b/res/layout/abstract_fragment_activity.xml @@ -15,7 +15,7 @@ android:id="@+id/bottom_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:background="@drawable/media_button"
+ android:background="?android:selectableItemBackground"
android:orientation="horizontal">
<ImageView
diff --git a/res/layout/album_cell_item.xml b/res/layout/album_cell_item.xml index 46024772..13fe9466 100644 --- a/res/layout/album_cell_item.xml +++ b/res/layout/album_cell_item.xml @@ -68,7 +68,7 @@ android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:paddingRight="2dp"
- android:background="@drawable/menubar_button"/>
+ android:background="?android:selectableItemBackground"/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file diff --git a/res/layout/album_list_item.xml b/res/layout/album_list_item.xml index a98f0e04..805c9033 100644 --- a/res/layout/album_list_item.xml +++ b/res/layout/album_list_item.xml @@ -54,5 +54,5 @@ android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
android:paddingRight="10dip"
- android:background="@drawable/menubar_button"/>
+ android:background="?android:selectableItemBackground"/>
</LinearLayout>
diff --git a/res/layout/appwidget4x1.xml b/res/layout/appwidget4x1.xml index 45ab7886..5d75c9e9 100644 --- a/res/layout/appwidget4x1.xml +++ b/res/layout/appwidget4x1.xml @@ -30,7 +30,7 @@ android:clickable="true" android:focusable="true" android:orientation="vertical" - android:background="@drawable/media_button"> + android:background="?android:selectableItemBackground"> <TextView android:id="@+id/title" @@ -81,7 +81,7 @@ android:layout_height="fill_parent" android:layout_weight="1" android:scaleType="center" - android:background="@drawable/media_button" + android:background="?android:selectableItemBackground" android:src="@drawable/ic_appwidget_music_previous" /> <ImageButton @@ -91,7 +91,7 @@ android:layout_weight="1" android:scaleType="center" android:src="@drawable/ic_appwidget_music_play" - android:background="@drawable/media_button" /> + android:background="?android:selectableItemBackground" /> <ImageButton android:id="@+id/control_next" @@ -100,7 +100,7 @@ android:layout_weight="1" android:scaleType="center" android:src="@drawable/ic_appwidget_music_next" - android:background="@drawable/media_button" /> + android:background="?android:selectableItemBackground" /> </LinearLayout> </LinearLayout> diff --git a/res/layout/appwidget4x2.xml b/res/layout/appwidget4x2.xml index 0101f76a..8ec61a59 100644 --- a/res/layout/appwidget4x2.xml +++ b/res/layout/appwidget4x2.xml @@ -32,7 +32,7 @@ android:orientation="vertical" android:paddingTop="4dip" android:paddingBottom="4dip" - android:background="@drawable/media_button"> + android:background="?android:selectableItemBackground"> <TextView android:id="@+id/title" @@ -104,7 +104,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:scaleType="center" - android:background="@drawable/media_button" + android:background="?android:selectableItemBackground" android:src="@drawable/ic_appwidget_music_previous" /> <ImageButton @@ -114,7 +114,7 @@ android:layout_weight="1" android:scaleType="center" android:src="@drawable/ic_appwidget_music_play" - android:background="@drawable/media_button" /> + android:background="?android:selectableItemBackground" /> <ImageButton android:id="@+id/control_next" @@ -123,7 +123,7 @@ android:layout_weight="1" android:scaleType="center" android:src="@drawable/ic_appwidget_music_next" - android:background="@drawable/media_button" /> + android:background="?android:selectableItemBackground" /> </LinearLayout> </LinearLayout> diff --git a/res/layout/appwidget4x3.xml b/res/layout/appwidget4x3.xml index 70ab3648..1758602b 100644 --- a/res/layout/appwidget4x3.xml +++ b/res/layout/appwidget4x3.xml @@ -34,7 +34,7 @@ android:orientation="vertical" android:paddingBottom="4dip" android:paddingTop="4dip" - android:background="@drawable/media_button"> + android:background="?android:selectableItemBackground"> <TextView android:id="@+id/title" @@ -86,7 +86,7 @@ android:layout_height="56dip" android:layout_weight="1" android:scaleType="center" - android:background="@drawable/media_button" + android:background="?android:selectableItemBackground" android:src="@drawable/ic_appwidget_music_previous" /> <ImageButton @@ -96,7 +96,7 @@ android:layout_weight="1" android:scaleType="center" android:src="@drawable/ic_appwidget_music_play" - android:background="@drawable/media_button" /> + android:background="?android:selectableItemBackground" /> <ImageButton android:id="@+id/control_next" @@ -105,7 +105,7 @@ android:layout_weight="1" android:scaleType="center" android:src="@drawable/ic_appwidget_music_next" - android:background="@drawable/media_button" /> + android:background="?android:selectableItemBackground" /> </LinearLayout> </LinearLayout> diff --git a/res/layout/appwidget4x4.xml b/res/layout/appwidget4x4.xml index 302bf297..b15a7339 100644 --- a/res/layout/appwidget4x4.xml +++ b/res/layout/appwidget4x4.xml @@ -35,7 +35,7 @@ android:orientation="vertical" android:paddingTop="4dip" android:paddingBottom="4dip" - android:background="@drawable/media_button"> + android:background="?android:selectableItemBackground"> <TextView android:id="@+id/title" @@ -88,7 +88,7 @@ android:layout_height="56dip" android:layout_weight="1" android:scaleType="center" - android:background="@drawable/media_button" + android:background="?android:selectableItemBackground" android:src="@drawable/ic_appwidget_music_previous" /> <ImageButton @@ -98,7 +98,7 @@ android:layout_weight="1" android:scaleType="center" android:src="@drawable/ic_appwidget_music_play" - android:background="@drawable/media_button" /> + android:background="?android:selectableItemBackground" /> <ImageButton android:id="@+id/control_next" @@ -107,7 +107,7 @@ android:layout_weight="1" android:scaleType="center" android:src="@drawable/ic_appwidget_music_next" - android:background="@drawable/media_button" /> + android:background="?android:selectableItemBackground" /> </LinearLayout> </LinearLayout> diff --git a/res/layout/basic_list_item.xml b/res/layout/basic_list_item.xml index 2295a9ba..a49d0c3d 100644 --- a/res/layout/basic_list_item.xml +++ b/res/layout/basic_list_item.xml @@ -34,5 +34,5 @@ android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
android:paddingRight="10dip"
- android:background="@drawable/menubar_button"/>
+ android:background="?android:selectableItemBackground"/>
</LinearLayout>
\ No newline at end of file diff --git a/res/layout/complex_list_item.xml b/res/layout/complex_list_item.xml index 87fa7b2f..947b2ee0 100644 --- a/res/layout/complex_list_item.xml +++ b/res/layout/complex_list_item.xml @@ -46,5 +46,5 @@ android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
android:paddingRight="10dip"
- android:background="@drawable/menubar_button"/>
+ android:background="?android:selectableItemBackground"/>
</LinearLayout>
\ No newline at end of file diff --git a/res/layout/notification.xml b/res/layout/notification.xml index 55c7be2a..e4cec6fb 100644 --- a/res/layout/notification.xml +++ b/res/layout/notification.xml @@ -51,7 +51,7 @@ <ImageButton android:id="@+id/control_previous" android:src="@drawable/notification_previous" - android:background="@drawable/btn_bg" + android:background="?android:selectableItemBackground" android:layout_width="46dip" android:layout_height="fill_parent" android:layout_gravity="center|right" @@ -62,7 +62,7 @@ <ImageButton android:id="@+id/control_pause" android:src="@drawable/notification_pause" - android:background="@drawable/btn_bg" + android:background="?android:selectableItemBackground" android:layout_width="46dip" android:layout_height="fill_parent" android:layout_gravity="center|right" @@ -73,7 +73,7 @@ <ImageButton android:id="@+id/control_next" android:src="@drawable/notification_next" - android:background="@drawable/btn_bg" + android:background="?android:selectableItemBackground" android:layout_width="46dip" android:layout_height="fill_parent" android:layout_gravity="center|right" diff --git a/res/layout/notification_expanded.xml b/res/layout/notification_expanded.xml index 5fc4156a..9fd6c68d 100644 --- a/res/layout/notification_expanded.xml +++ b/res/layout/notification_expanded.xml @@ -40,7 +40,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/notification_close" - android:background="@drawable/btn_bg" + android:background="?android:selectableItemBackground" android:padding="10dip" android:layout_gravity="right" android:visibility="gone"/> @@ -86,7 +86,7 @@ android:layout_gravity="center" android:layout_weight="1" android:padding="10dip" - android:background="@drawable/btn_bg" + android:background="?android:selectableItemBackground" android:scaleType="fitCenter" android:src="@drawable/notification_previous" /> @@ -97,7 +97,7 @@ android:layout_gravity="center" android:layout_weight="1" android:padding="10dip" - android:background="@drawable/btn_bg" + android:background="?android:selectableItemBackground" android:scaleType="fitCenter" android:src="@drawable/notification_pause" /> @@ -108,7 +108,7 @@ android:layout_gravity="center" android:layout_weight="1" android:padding="10dip" - android:background="@drawable/btn_bg" + android:background="?android:selectableItemBackground" android:scaleType="fitCenter" android:src="@drawable/notification_next" /> </LinearLayout> diff --git a/res/layout/select_album_header.xml b/res/layout/select_album_header.xml index f803f3af..eb8346c3 100644 --- a/res/layout/select_album_header.xml +++ b/res/layout/select_album_header.xml @@ -80,7 +80,7 @@ android:padding="10dip" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" - android:background="@drawable/menubar_button"/> + android:background="?android:selectableItemBackground"/> </RelativeLayout> diff --git a/res/layout/song_list_item.xml b/res/layout/song_list_item.xml index 72ee298b..5b4a2895 100644 --- a/res/layout/song_list_item.xml +++ b/res/layout/song_list_item.xml @@ -102,5 +102,5 @@ android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
android:paddingRight="10dip"
- android:background="@drawable/menubar_button"/>
+ android:background="?android:selectableItemBackground"/>
</LinearLayout>
diff --git a/res/layout/user_list_item.xml b/res/layout/user_list_item.xml index 657dd910..d9b15cd0 100644 --- a/res/layout/user_list_item.xml +++ b/res/layout/user_list_item.xml @@ -41,5 +41,5 @@ android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
android:paddingRight="10dip"
- android:background="@drawable/menubar_button"/>
+ android:background="?android:selectableItemBackground"/>
</LinearLayout>
\ No newline at end of file diff --git a/res/values/styles.xml b/res/values/styles.xml index e64e5313..103e4e49 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <style name="PlaybackControl"> - <item name="android:background">@drawable/media_button</item> + <item name="android:background">?android:selectableItemBackground</item> <item name="android:scaleType">fitCenter</item> <item name="android:padding">6dip</item> <item name="android:layout_marginLeft">4dip</item> @@ -23,7 +23,7 @@ <item name="android:layout_weight">1</item> <item name="android:textSize">14sp</item> <item name="android:textStyle">bold</item> - <item name="android:background">@drawable/menubar_button</item> + <item name="android:background">?android:selectableItemBackground</item> <item name="android:textColor">?android:textColorPrimary</item> </style> @@ -32,7 +32,7 @@ <item name="android:layout_height">wrap_content</item> <item name="android:textStyle">bold</item> <item name="android:textSize">22sp</item> - <item name="android:background">@drawable/menubar_button</item> + <item name="android:background">?android:selectableItemBackground</item> <item name="android:paddingTop">4dip</item> <item name="android:paddingBottom">4dip</item> <item name="android:paddingRight">4dip</item> @@ -42,7 +42,7 @@ <style name="DownloadActionImageButton"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> - <item name="android:background">@drawable/menubar_button</item> + <item name="android:background">?android:selectableItemBackground</item> <item name="android:paddingTop">8dip</item> <item name="android:paddingBottom">8dip</item> <item name="android:paddingRight">16dip</item> |