Bug 1068411 - Long search text runs under "x" button in search bar. r=margaret
☠☠ backed out by b547004f9c09 ☠ ☠
authorChenxia Liu <liuche@mozilla.com>
Mon, 27 Oct 2014 10:37:15 -0700
changeset 212457 3cd24f004c1abbd303eb1899609d87739e0d7f9e
parent 212456 c842e694f6b78f9ff780f0b58f47aff3aba8c264
child 212458 b0956a9f57a9e9679056faefdf3f093aecef1a37
push id9581
push usercliu@mozilla.com
push dateMon, 27 Oct 2014 17:38:16 +0000
treeherderfx-team@3cd24f004c1a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1068411
milestone36.0a1
Bug 1068411 - Long search text runs under "x" button in search bar. r=margaret
mobile/android/base/resources/drawable/edit_text_default.xml
mobile/android/base/resources/drawable/edit_text_focused.xml
mobile/android/base/resources/values/search_dimens.xml
--- a/mobile/android/base/resources/drawable/edit_text_default.xml
+++ b/mobile/android/base/resources/drawable/edit_text_default.xml
@@ -5,18 +5,20 @@
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 
     <!-- Make sure the border only appears at the bottom of the background -->
     <item
         android:top="-2dp"
         android:right="-2dp"
         android:left="-2dp">
         <shape>
-            <!-- Padding creates vertical space between the text and the underline -->
+            <!-- Padding creates vertical space between the text and the underline,
+                 as well as right padding for search icon/clear button -->
             <padding
                 android:top="@dimen/search_bar_padding_y"
-                android:bottom="@dimen/search_bar_padding_y"/>
+                android:bottom="@dimen/search_bar_padding_y"
+                android:right="@dimen/search_bar_padding_right"/>
             <solid android:color="@android:color/transparent"/>
             <stroke android:width="1dp" android:color="@color/edit_text_default"/>
         </shape>
     </item>
 
 </layer-list>
--- a/mobile/android/base/resources/drawable/edit_text_focused.xml
+++ b/mobile/android/base/resources/drawable/edit_text_focused.xml
@@ -5,19 +5,21 @@
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 
     <!-- Make sure the border only appears at the bottom of the background -->
     <item
         android:top="-3dp"
         android:right="-3dp"
         android:left="-3dp">
         <shape>
-            <!-- Padding creates vertical space between the text and the underline -->
+            <!-- Padding creates vertical space between the text and the underline,
+                 as well as right padding for search icon/clear button -->
             <padding
                 android:top="@dimen/search_bar_padding_y"
-                android:bottom="@dimen/search_bar_padding_y"/>
+                android:bottom="@dimen/search_bar_padding_y"
+                android:right="@dimen/search_bar_padding_right"/>
             <solid android:color="@android:color/transparent"/>
             <!-- We apply a color filter to set the color for the selected search engine -->
             <stroke android:width="2dp" android:color="@android:color/white"/>
         </shape>
     </item>
 
 </layer-list>
--- a/mobile/android/base/resources/values/search_dimens.xml
+++ b/mobile/android/base/resources/values/search_dimens.xml
@@ -9,16 +9,19 @@
     <dimen name="progress_bar_height">3dp</dimen>
 
     <!-- Size of the text for query input and suggestions -->
     <dimen name="query_text_size">16sp</dimen>
 
     <dimen name="search_row_padding">15dp</dimen>
     <dimen name="search_bar_padding_y">10dp</dimen>
 
+    <!-- Padding to account for search engine icon/clear button -->
+    <dimen name="search_bar_padding_right">25dp</dimen>
+
     <dimen name="search_history_drawable_padding">10dp</dimen>
 
     <!-- Widget Buttons -->
     <dimen name="widget_header_height">70dp</dimen>
     <dimen name="widget_button_offset">-50dp</dimen>
     <dimen name="widget_button_padding">45dp</dimen>
     <dimen name="widget_text_size">14sp</dimen>
     <dimen name="widget_padding">7dp</dimen>