diff options
author | Mangesh Ghiware <mghiware@google.com> | 2011-10-12 14:43:32 -0700 |
---|---|---|
committer | Mangesh Ghiware <mghiware@google.com> | 2011-10-12 15:36:31 -0700 |
commit | 67f45c29882e5f9400a38d5387fe474a42cbb620 (patch) | |
tree | e0f8d8772bb186d76f6325dc06d140c4b3b18961 /src/com/android/browser/preferences | |
parent | e1e4e1b2ad588f227872468cf7dbe51e647b565e (diff) | |
download | packages_apps_Browser-67f45c29882e5f9400a38d5387fe474a42cbb620.zip packages_apps_Browser-67f45c29882e5f9400a38d5387fe474a42cbb620.tar.gz packages_apps_Browser-67f45c29882e5f9400a38d5387fe474a42cbb620.tar.bz2 |
Add setting for configuring zoom level on double-tap.
Added a seek bar in Accessibility settings to configure the zoom level
on double-tap. The range is 75-125% with the default of 100% equal to
the display density.
Bug: 5312461
Change-Id: Iaf1b9f6f6659146db4031c5f819ef9cb55695b5c
Diffstat (limited to 'src/com/android/browser/preferences')
-rw-r--r-- | src/com/android/browser/preferences/AccessibilityPreferencesFragment.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/browser/preferences/AccessibilityPreferencesFragment.java b/src/com/android/browser/preferences/AccessibilityPreferencesFragment.java index 6adfd23..c07c184 100644 --- a/src/com/android/browser/preferences/AccessibilityPreferencesFragment.java +++ b/src/com/android/browser/preferences/AccessibilityPreferencesFragment.java @@ -45,6 +45,9 @@ public class AccessibilityPreferencesFragment extends PreferenceFragment e = findPreference(PreferenceKeys.PREF_TEXT_ZOOM); e.setOnPreferenceChangeListener(this); updateTextZoomSummary(e, settings.getTextZoom()); + e = findPreference(PreferenceKeys.PREF_DOUBLE_TAP_ZOOM); + e.setOnPreferenceChangeListener(this); + updateDoubleTapZoomSummary(e, settings.getDoubleTapZoom()); e = findPreference(PreferenceKeys.PREF_INVERTED_CONTRAST); e.setOnPreferenceChangeListener(this); updateInvertedContrastSummary(e, (int) (settings.getInvertedContrast() * 100)); @@ -59,6 +62,10 @@ public class AccessibilityPreferencesFragment extends PreferenceFragment pref.setSummary(mFormat.format(textZoom / 100.0)); } + void updateDoubleTapZoomSummary(Preference pref, int doubleTapZoom) { + pref.setSummary(mFormat.format(doubleTapZoom / 100.0)); + } + void updateInvertedContrastSummary(Preference pref, int contrast) { pref.setSummary(mFormat.format(contrast / 100.0)); } @@ -80,6 +87,11 @@ public class AccessibilityPreferencesFragment extends PreferenceFragment updateTextZoomSummary(pref, settings .getAdjustedTextZoom((Integer) objValue)); } + if (PreferenceKeys.PREF_DOUBLE_TAP_ZOOM.equals(pref.getKey())) { + BrowserSettings settings = BrowserSettings.getInstance(); + updateDoubleTapZoomSummary(pref, settings + .getAdjustedDoubleTapZoom((Integer) objValue)); + } if (PreferenceKeys.PREF_INVERTED_CONTRAST.equals(pref.getKey())) { updateInvertedContrastSummary(pref, (int) ((10 + (Integer) objValue) * 10)); |