Use new assets for green box in voice title bar.
The new assets have a better margin to match the other
search field textfields. Also update title_voice.xml to use a
pressed state that matches the new assets. In TitleBar.java,
do not clear out the vertical padding in voice search mode.
Bug 2566133
Change-Id: Icb15d0660d2f06363e66adbdd92537e34b90b64e
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java
index 2c25534..fc39f36 100644
--- a/src/com/android/browser/TitleBar.java
+++ b/src/com/android/browser/TitleBar.java
@@ -280,6 +280,9 @@
mTitle.setEllipsize(null);
mRtButton.setVisibility(View.VISIBLE);
mStopButton.setVisibility(View.GONE);
+ mTitleBg.setBackgroundDrawable(titleDrawable);
+ mTitleBg.setPadding(mLeftMargin, getPaddingTop(), mRightMargin,
+ getPaddingBottom());
} else {
if (mInLoad) {
titleDrawable = mLoadingBackground;
@@ -292,10 +295,10 @@
mRtButton.setImageDrawable(mBookmarkDrawable);
}
mTitle.setEllipsize(TextUtils.TruncateAt.END);
+ mTitleBg.setBackgroundDrawable(titleDrawable);
+ mTitleBg.setPadding(mLeftMargin, 0, mRightMargin, 0);
}
mTitle.setSingleLine(!mInVoiceMode);
- mTitleBg.setBackgroundDrawable(titleDrawable);
- mTitleBg.setPadding(mLeftMargin, 0, mRightMargin, 0);
}
/**