diff options
author | Brian Attwell <brianattwell@google.com> | 2014-05-21 00:31:19 -0700 |
---|---|---|
committer | Brian Attwell <brianattwell@google.com> | 2014-05-21 10:39:52 -0700 |
commit | f3b0f2048e5d289834c2d421866b0c5231860f59 (patch) | |
tree | 1808ee0b9af3aef6c2a06258edac888235f93343 /res/drawable | |
parent | f99cadf7dad02ad52835068fcc89dbe72638f7dc (diff) | |
download | packages_apps_ContactsCommon-f3b0f2048e5d289834c2d421866b0c5231860f59.tar.gz packages_apps_ContactsCommon-f3b0f2048e5d289834c2d421866b0c5231860f59.tar.bz2 packages_apps_ContactsCommon-f3b0f2048e5d289834c2d421866b0c5231860f59.zip |
ActionBarTab ripple draws below selection strip
This won't noticably change Dialer, since the selection strip is
the same color as the ripple color.
Change-Id: Ibf61c6ea0ab8b0c8da520b9b56b6eb521ffc99ef
Diffstat (limited to 'res/drawable')
-rw-r--r-- | res/drawable/action_bar_tab.xml | 10 | ||||
-rw-r--r-- | res/drawable/tab_selected.xml | 18 | ||||
-rw-r--r-- | res/drawable/tab_selected_focused.xml | 14 | ||||
-rw-r--r-- | res/drawable/tab_unselected_focused.xml | 17 |
4 files changed, 28 insertions, 31 deletions
diff --git a/res/drawable/action_bar_tab.xml b/res/drawable/action_bar_tab.xml index b79ec5d9..ecf463c7 100644 --- a/res/drawable/action_bar_tab.xml +++ b/res/drawable/action_bar_tab.xml @@ -14,9 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. --> -<ripple xmlns:android="http://schemas.android.com/apk/res/android" +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:tint="@color/tab_pressed_color"> <item> + <ripple android:tint="@color/tab_pressed_color"> + <item android:drawable="@color/tab_default_color" /> + </ripple> + </item> + <item> <selector> <item android:drawable="@drawable/tab_selected" android:state_focused="false" @@ -32,7 +37,6 @@ android:state_selected="false" /> <item android:drawable="@drawable/tab_selected" android:state_selected="true" /> - <item android:drawable="@color/tab_default_color" /> </selector> </item> -</ripple>
\ No newline at end of file +</layer-list>
\ No newline at end of file diff --git a/res/drawable/tab_selected.xml b/res/drawable/tab_selected.xml index 78f1eda6..16c791e6 100644 --- a/res/drawable/tab_selected.xml +++ b/res/drawable/tab_selected.xml @@ -14,10 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. --> -<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > - <!-- Tab selected underline --> - <item android:drawable="@color/tab_selected_color" /> - <!-- Tab background --> - <item android:drawable="@color/tab_default_color" - android:bottom="@dimen/tab_selected_underline_height" /> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- Use a rectangle to draw a bottom aligned line. The other three sides + of the rectangle are off the side of the screen --> + <item + android:top="@dimen/tab_selected_underline_height_negative" + android:right="@dimen/tab_selected_underline_height_negative" + android:left="@dimen/tab_selected_underline_height_negative"> + <shape android:shape="rectangle"> + <stroke android:width="@dimen/tab_selected_underline_height" + android:color="@color/tab_selected_color"/> + </shape> + </item> </layer-list>
\ No newline at end of file diff --git a/res/drawable/tab_selected_focused.xml b/res/drawable/tab_selected_focused.xml index c81c7aad..b21b0a4b 100644 --- a/res/drawable/tab_selected_focused.xml +++ b/res/drawable/tab_selected_focused.xml @@ -16,15 +16,7 @@ --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <!-- Tab selected underline --> - <item android:drawable="@color/tab_selected_color" /> - <!-- Tab background --> - <item android:drawable="@color/tab_default_color" - android:bottom="@dimen/tab_selected_underline_height" /> - <item> - <shape android:shape="rectangle" > - <stroke - android:width="4dp" - android:color="@color/focus_color" /> - </shape> - </item> + <item android:drawable="@drawable/tab_selected" /> + <!-- Focus rectangle --> + <item android:drawable="@drawable/tab_unselected_focused" /> </layer-list>
\ No newline at end of file diff --git a/res/drawable/tab_unselected_focused.xml b/res/drawable/tab_unselected_focused.xml index 13ec95d7..aef4da86 100644 --- a/res/drawable/tab_unselected_focused.xml +++ b/res/drawable/tab_unselected_focused.xml @@ -14,14 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. --> -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- Tab background --> - <item android:drawable="@color/tab_default_color" /> - <item> - <shape android:shape="rectangle" > - <stroke - android:width="4dp" - android:color="@color/focus_color" /> - </shape> - </item> -</layer-list>
\ No newline at end of file +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" > + <stroke + android:width="4dp" + android:color="@color/focus_color" /> +</shape>
\ No newline at end of file |