summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mike Reed <reed@google.com> 2009-11-12 12:50:20 -0500
committer Grace Kloba <klobag@google.com> 2009-12-10 17:52:10 -0800
commit8b30209727b2a69a47cf7f7643ce9a56597f4ace (patch)
tree8e0a54c8139abe90b12bda1821c45cb9210bd2fc
parent7cd4029473431c56100e52f631b9733829dc3171 (diff)
Update the zoom buttons after moving to a new page.
Move set VISIBLE out of updateZoomButtonsEnabled. And add it to a place it needs it. Fix http://b/issue?id=2257742
-rw-r--r--core/java/android/webkit/WebView.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 93e95bf084ca..b5d283d4cce4 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -700,6 +700,9 @@ public class WebView extends AbsoluteLayout
public void onVisibilityChanged(boolean visible) {
if (visible) {
switchOutDrawHistory();
+ // Bring back the hidden zoom controls.
+ mZoomButtonsController.getZoomControls().setVisibility(
+ View.VISIBLE);
updateZoomButtonsEnabled();
}
}
@@ -788,9 +791,6 @@ public class WebView extends AbsoluteLayout
// button, if the page cannot zoom
mZoomButtonsController.getZoomControls().setVisibility(View.GONE);
} else {
- // Bring back the hidden zoom controls.
- mZoomButtonsController.getZoomControls()
- .setVisibility(View.VISIBLE);
// Set each one individually, as a page may be able to zoom in
// or out.
mZoomButtonsController.setZoomInEnabled(canZoomIn);
@@ -5228,6 +5228,10 @@ public class WebView extends AbsoluteLayout
// particular when the user was on a password field, so
// the WebTextView was visible.
clearTextEntry();
+ // update the zoom buttons as the scale can be changed
+ if (getSettings().getBuiltInZoomControls()) {
+ updateZoomButtonsEnabled();
+ }
}
// We update the layout (i.e. request a layout from the
// view system) if the last view size that we sent to