Limit the touch area for opening search to the right edge of the textfield.
Now all single taps to the title bar will result in either
a search or opening the bookmarks picker, depending on whether
they were past the right edge of the textfield.
Fixes http://b/issue?id=2113429
Also move the lock icon in between the favicon and the url. See
http://b/issue?id=2085847
Change-Id: I30447aa7517b6fc801d3cf34eff233db3a4ce635
diff --git a/res/layout/title_bar.xml b/res/layout/title_bar.xml
index eb9f7f9..ddfcd6e 100644
--- a/res/layout/title_bar.xml
+++ b/res/layout/title_bar.xml
@@ -36,29 +36,42 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dip"
- android:orientation="horizontal">
+ android:orientation="horizontal"
+ >
- <TextView
- android:id="@+id/title"
+ <LinearLayout
android:background="@*android:drawable/textfield_default"
- android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1.0"
- android:paddingLeft="8dip"
- android:paddingRight="6dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/black"
- android:gravity="center_vertical"
- android:singleLine="true"
- android:ellipsize="end"
- />
- <ImageView android:id="@+id/lock"
- android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="3dip"
- android:layout_gravity="center_vertical"
- android:visibility="gone"
- />
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ >
+ <ImageView android:id="@+id/favicon"
+ android:layout_width="20dip"
+ android:layout_height="20dip"
+ android:layout_marginLeft="3dip"
+ />
+ <ImageView android:id="@+id/lock"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="6dip"
+ android:visibility="gone"
+ />
+ <TextView
+ android:id="@+id/title"
+ android:layout_height="wrap_content"
+ android:layout_width="0dip"
+ android:layout_weight="1.0"
+ android:paddingLeft="8dip"
+ android:paddingRight="6dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="@color/black"
+ android:gravity="center_vertical"
+ android:singleLine="true"
+ android:ellipsize="end"
+ />
+ </LinearLayout>
<ImageView
android:id="@+id/rt_btn"
android:layout_width="42dip"