Move the zoom buttons to the bottom right for the browser.

Per Leland's latest design, the zoom buttons should be on
the bottom right of the screen.  Move them there.
This commit is contained in:
Leon Scroggins
2009-06-11 14:46:35 -04:00
parent c581e27c13
commit aa3f96a745

View File

@@ -694,6 +694,16 @@ public class WebView extends AbsoluteLayout
mZoomButtonsController = new ZoomButtonsController(this);
mZoomButtonsController.setOnZoomListener(mZoomListener);
// ZoomButtonsController positions the buttons at the bottom, but in
// the middle. Change their layout parameters so they appear on the
// right.
View controls = mZoomButtonsController.getZoomControls();
ViewGroup.LayoutParams params = controls.getLayoutParams();
if (params instanceof FrameLayout.LayoutParams) {
FrameLayout.LayoutParams frameParams = (FrameLayout.LayoutParams)
params;
frameParams.gravity = Gravity.RIGHT;
}
}
private void updateZoomButtonsEnabled() {