diff options
author | Mangesh Ghiware <mghiware@google.com> | 2011-10-13 09:19:21 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-10-13 09:19:21 -0700 |
commit | facba0eb36de46bc2abba9f20a5ac7950f0ded62 (patch) | |
tree | ad3d2acc40617b898dd27666ddea3bdf10d1a6ea /src/com/android/browser/preferences | |
parent | 0e08b0902e04eaaf5b11ec7deabdf9c0d94300b3 (diff) | |
parent | 132eedfc1cf97456cf03d55968bed4bc9e4eb817 (diff) | |
download | packages_apps_Browser-facba0eb36de46bc2abba9f20a5ac7950f0ded62.zip packages_apps_Browser-facba0eb36de46bc2abba9f20a5ac7950f0ded62.tar.gz packages_apps_Browser-facba0eb36de46bc2abba9f20a5ac7950f0ded62.tar.bz2 |
am 132eedfc: Merge "Add setting for configuring zoom level on double-tap." into ics-mr0
* commit '132eedfc1cf97456cf03d55968bed4bc9e4eb817':
Add setting for configuring zoom level on double-tap.
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)); |