From aa3f96a745c8285f07d32cf150d8a511ed5f6b05 Mon Sep 17 00:00:00 2001 From: Leon Scroggins Date: Thu, 11 Jun 2009 14:46:35 -0400 Subject: [PATCH] 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. --- core/java/android/webkit/WebView.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 81800fb419c52..aca86a0e8817d 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -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() {