Bug 1068411 - Long search text runs under "x" button in search bar. r=margaret
authorChenxia Liu <liuche@mozilla.com>
Mon, 27 Oct 2014 17:21:57 -0700
changeset 212544 9eea6cacf02a17e156e9b9bfc013cb6cd9a26e15
parent 212543 9e878bc102e3fe538f4bdf71bc9ca93c96627446
child 212545 0d00ee006544cdd1462f3fce34fb139722908ac0
push id27720
push usercbook@mozilla.com
push dateTue, 28 Oct 2014 14:51:21 +0000
treeherdermozilla-central@a2d58c6420f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1068411
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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>