Bug 838748: Change pressed state of tabs-ui rows. [r=mfinkle] [a=bbajaj]
authorSriram Ramasubramanian <sriram@mozilla.com>
Thu, 07 Feb 2013 12:48:28 -0800
changeset 127464 da9d24b6b6784e1d9a7eeb783f27778167ab61de
parent 127463 648099fff122cc64ccb059607279902ae1631563
child 127465 68c18f9cc5888aad156ec191605ad0657ef3ba92
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, bbajaj
bugs838748
milestone20.0a2
Bug 838748: Change pressed state of tabs-ui rows. [r=mfinkle] [a=bbajaj]
mobile/android/base/Makefile.in
mobile/android/base/resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable/tab_row.xml
mobile/android/base/resources/layout-xlarge-v11/tabs_row.xml
mobile/android/base/resources/layout/tabs_row.xml
mobile/android/base/resources/values/colors.xml
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -1079,16 +1079,17 @@ MOZ_ANDROID_DRAWABLES += \
   mobile/android/base/resources/drawable/progress_spinner_12.png                \
   mobile/android/base/resources/drawable/remote_tabs_child_divider.xml          \
   mobile/android/base/resources/drawable/remote_tabs_level.xml                  \
   mobile/android/base/resources/drawable/start.png                              \
   mobile/android/base/resources/drawable/site_security_level.xml                \
   mobile/android/base/resources/drawable/spinner.xml                            \
   mobile/android/base/resources/drawable/suggestion_selector.xml                \
   mobile/android/base/resources/drawable/tab_new_level.xml                      \
+  mobile/android/base/resources/drawable/tab_row.xml                            \
   mobile/android/base/resources/drawable/tab_thumbnail.xml                      \
   mobile/android/base/resources/drawable/tabs_button.xml                        \
   mobile/android/base/resources/drawable/tabs_level.xml                         \
   mobile/android/base/resources/drawable/tabs_panel_indicator.xml               \
   mobile/android/base/resources/drawable/tabs_tray_bg_repeat.xml                \
   mobile/android/base/resources/drawable/tabs_tray_dark_bg_repeat.xml           \
   mobile/android/base/resources/drawable/shadow.png                             \
   mobile/android/base/resources/drawable/marketplace.png                        \
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/drawable/tab_row.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_focused="true"
+          android:drawable="@color/tab_row_pressed"/>
+
+    <item android:state_pressed="true"
+          android:drawable="@color/tab_row_pressed"/>
+
+    <item android:drawable="@android:color/transparent"/>
+
+</selector>
--- a/mobile/android/base/resources/layout-xlarge-v11/tabs_row.xml
+++ b/mobile/android/base/resources/layout-xlarge-v11/tabs_row.xml
@@ -4,17 +4,18 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <Gecko.TabRow xmlns:android="http://schemas.android.com/apk/res/android"
               android:focusable="true"
               android:id="@+id/info"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content"
               android:padding="6dip"
-              android:gravity="center">
+              android:gravity="center"
+              android:background="@drawable/tab_row">
 
     <RelativeLayout android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_margin="6dip"
                     android:padding="4dip"
                     android:background="@drawable/tab_thumbnail"
                     android:duplicateParentState="true">
 
--- a/mobile/android/base/resources/layout/tabs_row.xml
+++ b/mobile/android/base/resources/layout/tabs_row.xml
@@ -6,17 +6,18 @@
 <Gecko.TabRow xmlns:android="http://schemas.android.com/apk/res/android"
               android:focusable="true"
               android:id="@+id/info"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content"
               android:paddingLeft="12dip"
               android:paddingRight="12dip"
               android:paddingTop="6dip"
-              android:paddingBottom="6dip">
+              android:paddingBottom="6dip"
+              android:background="@drawable/tab_row">
 
     <LinearLayout android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:padding="4dip"
                   android:background="@drawable/tab_thumbnail"
                   android:duplicateParentState="true">
 
         <Gecko.ThumbnailView android:id="@+id/thumbnail"
--- a/mobile/android/base/resources/values/colors.xml
+++ b/mobile/android/base/resources/values/colors.xml
@@ -13,12 +13,13 @@
   <color name="identity_verified">#77BAFF</color>
   <color name="identity_identified">#B7D46A</color>
   <color name="url_bar_text_highlight">#FFFF9500</color>
   <color name="url_bar_text_highlight_pb">#FFD06BFF</color>
   <color name="suggestion_primary">#dddddd</color>
   <color name="suggestion_pressed">#bbbbbb</color>
   <color name="tab_indicator_unselected">@android:color/transparent</color>
   <color name="tab_indicator_unselected_focused">#34FF9500</color>
+  <color name="tab_row_pressed">#4D000000</color>
   <color name="abouthome_topsite_shadow">#1000</color>
   <color name="abouthome_topsite_pin">#55000000</color>
 </resources>