Bug 1068411 - Long search text runs under "x" button in search bar. r=margaret, a=lsblakk
authorChenxia Liu <liuche@mozilla.com>
Mon, 27 Oct 2014 17:21:57 -0700
changeset 233542 bf0c996166662cd8c9ca6ba2ae2623d29ab26ae7
parent 233541 42d38ca6114d3fdebbf913830151603593925784
child 233543 569c893707446cd5009190b9cd06f278035aa2eb
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret, lsblakk
bugs1068411
milestone35.0a2
Bug 1068411 - Long search text runs under "x" button in search bar. r=margaret, a=lsblakk
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>