diff options
author | Leon Scroggins <scroggo@google.com> | 2010-10-15 15:49:40 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-10-15 15:49:40 -0400 |
commit | 8a2a0e7320a2f61fb37669ff0e3228f593fd6d25 (patch) | |
tree | d6a989b91b8e91568a45438e6fe05a0995825f37 /src/com/android/browser | |
parent | efdc108835c64b28ce7bc118919ee42398cb6983 (diff) | |
download | packages_apps_Browser-8a2a0e7320a2f61fb37669ff0e3228f593fd6d25.zip packages_apps_Browser-8a2a0e7320a2f61fb37669ff0e3228f593fd6d25.tar.gz packages_apps_Browser-8a2a0e7320a2f61fb37669ff0e3228f593fd6d25.tar.bz2 |
Change the back button to INVISIBLE instead of GONE.
The problem with setting it to GONE is that it does not get
measured when determining the height. This means that if a
crumb cannot go back and the back button is removed as a
result, the BreadCrumbView will change its height,
resulting in some jumpiness.
Change-Id: I62b32dfb0b0b72fe462bf9ec8413372786c414ab
Diffstat (limited to 'src/com/android/browser')
-rw-r--r-- | src/com/android/browser/BreadCrumbView.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/browser/BreadCrumbView.java b/src/com/android/browser/BreadCrumbView.java index 8e3acf7..e501703 100644 --- a/src/com/android/browser/BreadCrumbView.java +++ b/src/com/android/browser/BreadCrumbView.java @@ -146,7 +146,7 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { mBackButton.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)); mBackButton.setOnClickListener(this); - mBackButton.setVisibility(View.GONE); + mBackButton.setVisibility(View.INVISIBLE); addView(mBackButton, 0); } @@ -157,7 +157,7 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { mCrumbs.add(crumb); addView(crumb.crumbView); if (mUseBackButton) { - mBackButton.setVisibility(crumb.canGoBack ? View.VISIBLE : View.GONE); + mBackButton.setVisibility(crumb.canGoBack ? View.VISIBLE : View.INVISIBLE); } crumb.crumbView.setOnClickListener(this); } @@ -181,10 +181,10 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { mCrumbs.remove(n - 1); if (mUseBackButton) { Crumb top = getTopCrumb(); - if (top != null) { - mBackButton.setVisibility(top.canGoBack ? View.VISIBLE : View.GONE); + if (top != null && top.canGoBack) { + mBackButton.setVisibility(View.VISIBLE); } else { - mBackButton.setVisibility(View.GONE); + mBackButton.setVisibility(View.INVISIBLE); } } if (notify) { |