am 6cb69c7d: Merge change I8b302097 into eclair-mr2

Merge commit '6cb69c7d7496943cec7913a3a7ffab7f6d75e584' into eclair-mr2-plus-aosp

* commit '6cb69c7d7496943cec7913a3a7ffab7f6d75e584':
  Update the zoom buttons after moving to a new page.
This commit is contained in:
Mike Reed
2009-12-11 08:44:40 -08:00
committed by Android Git Automerger

View File

@@ -700,6 +700,9 @@ public class WebView extends AbsoluteLayout
public void onVisibilityChanged(boolean visible) { public void onVisibilityChanged(boolean visible) {
if (visible) { if (visible) {
switchOutDrawHistory(); switchOutDrawHistory();
// Bring back the hidden zoom controls.
mZoomButtonsController.getZoomControls().setVisibility(
View.VISIBLE);
updateZoomButtonsEnabled(); updateZoomButtonsEnabled();
} }
} }
@@ -788,9 +791,6 @@ public class WebView extends AbsoluteLayout
// button, if the page cannot zoom // button, if the page cannot zoom
mZoomButtonsController.getZoomControls().setVisibility(View.GONE); mZoomButtonsController.getZoomControls().setVisibility(View.GONE);
} else { } 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 // Set each one individually, as a page may be able to zoom in
// or out. // or out.
mZoomButtonsController.setZoomInEnabled(canZoomIn); mZoomButtonsController.setZoomInEnabled(canZoomIn);
@@ -5228,6 +5228,10 @@ public class WebView extends AbsoluteLayout
// particular when the user was on a password field, so // particular when the user was on a password field, so
// the WebTextView was visible. // the WebTextView was visible.
clearTextEntry(); 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 // We update the layout (i.e. request a layout from the
// view system) if the last view size that we sent to // view system) if the last view size that we sent to