summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2010-09-07 12:44:10 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-07 12:44:10 -0700
commit54cd561b6173352eb06a92a2b62d186ddbb4549d (patch)
tree37cee4268095510e934b280121f42e59b14eda35 /src/com/android/browser
parent344ff8b362aec733d3c73bb86f9819f8f549f891 (diff)
parent68775756e20243d73f273e4ce25ff3edeb148e41 (diff)
downloadpackages_apps_Browser-54cd561b6173352eb06a92a2b62d186ddbb4549d.tar.gz
packages_apps_Browser-54cd561b6173352eb06a92a2b62d186ddbb4549d.tar.bz2
packages_apps_Browser-54cd561b6173352eb06a92a2b62d186ddbb4549d.zip
Merge "disable zoom buttons"
Diffstat (limited to 'src/com/android/browser')
-rw-r--r--src/com/android/browser/BrowserActivity.java2
-rw-r--r--src/com/android/browser/TabControl.java12
2 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 06e07105e..9f1f3ba68 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -228,6 +228,8 @@ public class BrowserActivity extends Activity
ActionBar actionBar = getActionBar();
mTabBar = new TabBar(this, mTabControl, (TitleBarXLarge) mFakeTitleBar);
actionBar.setCustomNavigationMode(mTabBar);
+ // disable built in zoom controls
+ mTabControl.setDisplayZoomControls(false);
} else {
mTitleBar = new TitleBar(this);
// mTitleBar will be always be shown in the fully loaded mode on
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index 7377a1e73..d7435d712 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -48,6 +48,8 @@ class TabControl {
private final BrowserActivity mActivity;
// Directory to store thumbnails for each WebView.
private final File mThumbnailDir;
+ // Use on screen zoom buttons
+ private boolean mDisplayZoomControls;
/**
* Construct a new TabControl object that interfaces with the given
@@ -58,6 +60,7 @@ class TabControl {
TabControl(BrowserActivity activity) {
mActivity = activity;
mThumbnailDir = activity.getDir("thumbnails", 0);
+ mDisplayZoomControls = true;
}
File getThumbnailDir() {
@@ -69,6 +72,14 @@ class TabControl {
}
/**
+ * Set if the webview should use the on screen zoom controls
+ * @param enabled
+ */
+ void setDisplayZoomControls(boolean enabled) {
+ mDisplayZoomControls = enabled;
+ }
+
+ /**
* Return the current tab's main WebView. This will always return the main
* WebView for a given tab and not a subwindow.
* @return The current tab's WebView.
@@ -597,6 +608,7 @@ class TabControl {
w.setMapTrackballToArrowKeys(false); // use trackball directly
// Enable the built-in zoom
w.getSettings().setBuiltInZoomControls(true);
+ w.getSettings().setDisplayZoomControls(mDisplayZoomControls);
// Add this WebView to the settings observer list and update the
// settings
final BrowserSettings s = BrowserSettings.getInstance();