Lessen the difference in appearance of title bar during load.
Change to using textfield_search_empty assets, which have margin
values that better match the assets used outside of a load. As
a result, there is no longer a need to edit the LayoutParams in
TitleBar.java. However, do set the padding in TitleBar.java, since
it needs to be set for each of the different backgrounds used.
Fixes http://b/issue?id=2558919
Change-Id: Idf0d8bea59bcc76c32e1e03bf736a4b64bf31887
diff --git a/res/drawable/title_text.xml b/res/drawable/title_text.xml
index 6a214d9..b435e4d 100644
--- a/res/drawable/title_text.xml
+++ b/res/drawable/title_text.xml
@@ -18,7 +18,7 @@
pressed state even without window focus -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@*android:drawable/textfield_pressed" />
+ android:drawable="@*android:drawable/textfield_search_empty_pressed" />
<item android:state_pressed="false"
- android:drawable="@*android:drawable/textfield_default" />
+ android:drawable="@*android:drawable/textfield_search_empty_default" />
</selector>
diff --git a/res/layout/title_bar.xml b/res/layout/title_bar.xml
index c251250..9f0cb51 100644
--- a/res/layout/title_bar.xml
+++ b/res/layout/title_bar.xml
@@ -44,6 +44,7 @@
android:layout_width="0dip"
android:layout_weight="1.0"
android:layout_height="wrap_content"
+ android:layout_marginBottom="4dip"
android:gravity="center_vertical"
android:orientation="horizontal"
>
@@ -63,8 +64,7 @@
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1.0"
- android:paddingLeft="8dip"
- android:paddingRight="6dip"
+ android:layout_marginLeft="3dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black"
android:gravity="center_vertical"
@@ -76,6 +76,7 @@
android:background="@drawable/stop_background"
android:layout_width="wrap_content"
android:layout_height="match_parent"
+ android:layout_marginBottom="4dip"
android:src="@drawable/ic_btn_stop_v2"
android:visibility="gone"
/>