summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/TitleBar.java
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2009-09-11 18:37:53 -0400
committerLeon Scroggins <scroggo@google.com>2009-09-14 16:20:20 -0400
commitf4bb18a41259ce62209c768484547d33583f9c77 (patch)
treeea7807ea39323bff71f202818cee2d9987270ad9 /src/com/android/browser/TitleBar.java
parent11d2375bfc3042e3750028e026244bc9fc8d48b1 (diff)
downloadpackages_apps_browser-f4bb18a41259ce62209c768484547d33583f9c77.zip
packages_apps_browser-f4bb18a41259ce62209c768484547d33583f9c77.tar.gz
packages_apps_browser-f4bb18a41259ce62209c768484547d33583f9c77.tar.bz2
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
Diffstat (limited to 'src/com/android/browser/TitleBar.java')
-rw-r--r--src/com/android/browser/TitleBar.java23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java
index e830727..857aa38 100644
--- a/src/com/android/browser/TitleBar.java
+++ b/src/com/android/browser/TitleBar.java
@@ -45,7 +45,7 @@ public class TitleBar extends LinearLayout {
private ImageView mRtButton;
private Drawable mCircularProgress;
private ProgressBar mHorizontalProgress;
- private Drawable mFavicon;
+ private ImageView mFavicon;
private ImageView mLockIcon;
private Drawable mStopDrawable;
private Drawable mBookmarkDrawable;
@@ -65,19 +65,9 @@ public class TitleBar extends LinearLayout {
mTitle.setCompoundDrawablePadding(5);
mLockIcon = (ImageView) findViewById(R.id.lock);
+ mFavicon = (ImageView) findViewById(R.id.favicon);
mRtButton = (ImageView) findViewById(R.id.rt_btn);
- mRtButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- if (mInLoad) {
- if (mWebView != null) {
- mWebView.stopLoading();
- }
- } else {
- mBrowserActivity.bookmarksOrHistoryPicker(false);
- }
- }
- });
Resources resources = context.getResources();
mCircularProgress = (Drawable) resources.getDrawable(
com.android.internal.R.drawable.search_spinner);
@@ -123,10 +113,7 @@ public class TitleBar extends LinearLayout {
LayerDrawable d = new LayerDrawable(array);
d.setLayerInset(1, 1, 1, 1, 1);
d.setLayerInset(2, 2, 2, 2, 2);
- d.setBounds(0, 0, mIconDimension, mIconDimension);
- Drawable progress = mInLoad ? mCircularProgress : null;
- mTitle.setCompoundDrawables(d, null, progress, null);
- mFavicon = d;
+ mFavicon.setImageDrawable(d);
}
/**
@@ -146,7 +133,7 @@ public class TitleBar extends LinearLayout {
*/
/* package */ void setProgress(int newProgress) {
if (newProgress == mHorizontalProgress.getMax()) {
- mTitle.setCompoundDrawables(mFavicon, null, null, null);
+ mTitle.setCompoundDrawables(null, null, null, null);
((Animatable) mCircularProgress).stop();
mHorizontalProgress.setVisibility(View.INVISIBLE);
if (mBookmarkDrawable != null) {
@@ -156,7 +143,7 @@ public class TitleBar extends LinearLayout {
} else {
mHorizontalProgress.setProgress(newProgress);
if (!mInLoad) {
- mTitle.setCompoundDrawables(mFavicon, null, mCircularProgress,
+ mTitle.setCompoundDrawables(null, null, mCircularProgress,
null);
((Animatable) mCircularProgress).start();
mHorizontalProgress.setVisibility(View.VISIBLE);