Bug 764638: Find in page can better use LinearLayout. [r=margaret]
authorSriram Ramasubramanian <sriram@mozilla.com>
Thu, 14 Jun 2012 12:12:18 -0700
changeset 96759 69367ce1b01d0186a7073f4b6d70b03e072b7ed5
parent 96758 7b71940632770d0ddbaacdbfa02ad3d7ff4db685
child 96760 9bf21ba748d488d40869cd6de3510deff9d02226
push id853
push usertim.taubert@gmx.de
push dateSat, 16 Jun 2012 10:37:54 +0000
treeherderfx-team@4a457dd9d433 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs764638
milestone16.0a1
Bug 764638: Find in page can better use LinearLayout. [r=margaret]
mobile/android/base/FindInPageBar.java
mobile/android/base/resources/layout/find_in_page_content.xml
mobile/android/base/resources/values/styles.xml
--- a/mobile/android/base/FindInPageBar.java
+++ b/mobile/android/base/FindInPageBar.java
@@ -8,20 +8,19 @@ import android.content.Context;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.EditText;
-import android.widget.RelativeLayout;
-import android.widget.RelativeLayout.LayoutParams;
+import android.widget.LinearLayout;
 
-public class FindInPageBar extends RelativeLayout implements TextWatcher, View.OnClickListener {
+public class FindInPageBar extends LinearLayout implements TextWatcher, View.OnClickListener {
     private static final String LOGTAG = "GeckoFindInPagePopup";
 
     private final Context mContext;
     private EditText mFindText;
     private boolean mInflated = false;
 
     public FindInPageBar(Context context, AttributeSet attrs) {
         super(context, attrs);
--- a/mobile/android/base/resources/layout/find_in_page_content.xml
+++ b/mobile/android/base/resources/layout/find_in_page_content.xml
@@ -1,43 +1,37 @@
 <?xml version="1.0" encoding="utf-8"?>
 <merge xmlns:android="http://schemas.android.com/apk/res/android">
 
     <EditText android:id="@+id/find_text"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:layout_weight="1.0"
+              android:layout_marginLeft="5dip"
+              android:layout_marginRight="5dip"
               android:contentDescription="@string/find_text"
               android:background="@drawable/address_bar_url"
               android:singleLine="true"
               android:textColor="#000000"
               android:inputType="text"
-              android:layout_width="fill_parent"
-              android:layout_height="wrap_content"
-              android:layout_marginLeft="5dip"
-              android:layout_marginRight="5dip"
               android:paddingLeft="15dip"
               android:paddingRight="15dip"
               android:textColorHighlight="@color/url_bar_text_highlight"
               android:imeOptions="actionSearch"
               android:selectAllOnFocus="true"
-              android:gravity="center_vertical|left"
-              android:layout_toLeftOf="@+id/find_prev"/>
+              android:gravity="center_vertical|left"/>
 
     <ImageButton android:id="@+id/find_prev"
                  style="@style/FindBar.ImageButton"
                  android:contentDescription="@string/find_prev"
-                 android:src="@drawable/find_prev"
-                 android:layout_toLeftOf="@+id/find_next"
-                 android:background="@drawable/action_bar_button"/>
+                 android:src="@drawable/find_prev"/>
 
     <ImageButton android:id="@+id/find_next"
                  style="@style/FindBar.ImageButton"
                  android:contentDescription="@string/find_next"
-                 android:src="@drawable/find_next"
-                 android:layout_toLeftOf="@+id/find_close"
-                 android:background="@drawable/action_bar_button"/>
+                 android:src="@drawable/find_next"/>
 
     <ImageButton android:id="@+id/find_close"
                  style="@style/FindBar.ImageButton"
                  android:contentDescription="@string/find_close"
-                 android:src="@drawable/find_close"
-                 android:layout_alignParentRight="true"
-                 android:background="@drawable/action_bar_button"/>
+                 android:src="@drawable/find_close"/>
 
 </merge>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -119,12 +119,12 @@
     <!-- Find bar - Image Button -->
     <style name="FindBar.ImageButton">
         <item name="android:layout_width">wrap_content</item>
         <item name="android:layout_height">wrap_content</item>
         <item name="android:layout_marginLeft">5dip</item>
         <item name="android:layout_marginRight">5dip</item>
         <item name="android:scaleType">fitCenter</item>
         <item name="android:layout_centerVertical">true</item>
-        <item name="android:background">@android:color/transparent</item>
+        <item name="android:background">@drawable/action_bar_button</item>
     </style>
 
 </resources>