diff options
author | 2014-10-21 17:03:05 +0900 | |
---|---|---|
committer | 2014-10-30 11:45:41 +0900 | |
commit | bb9400aebc4cb0291b4f0208ecbc9ddc01dc79e1 (patch) | |
tree | e41760fb57991abaf33fb2ec077e0155e6c5e9b9 /java/src/com/android/inputmethod/latin/settings/Settings.java | |
parent | 80980574acfef74f9392da4fdbcba64d911cb66f (diff) | |
download | latinime-bb9400aebc4cb0291b4f0208ecbc9ddc01dc79e1.tar.gz latinime-bb9400aebc4cb0291b4f0208ecbc9ddc01dc79e1.tar.xz latinime-bb9400aebc4cb0291b4f0208ecbc9ddc01dc79e1.zip |
Add a preference to resize the keyboard height.
The keyboard height is controlled by a slider in the debug preferences.
Without access to debug preferences, this change is a no-op.
Bug: 6867494
Change-Id: I984064ed1cab752876615f5ed582818474d6041b
Diffstat (limited to 'java/src/com/android/inputmethod/latin/settings/Settings.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/settings/Settings.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java index 19db60655..16c053474 100644 --- a/java/src/com/android/inputmethod/latin/settings/Settings.java +++ b/java/src/com/android/inputmethod/latin/settings/Settings.java @@ -363,6 +363,12 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang return (milliseconds != UNDEFINED_PREFERENCE_VALUE_INT) ? milliseconds : defaultValue; } + public static float readKeyboardHeight(final SharedPreferences prefs, + final String prefKey, final float defaultValue) { + final float percentage = prefs.getFloat(prefKey, UNDEFINED_PREFERENCE_VALUE_FLOAT); + return (percentage != UNDEFINED_PREFERENCE_VALUE_FLOAT) ? percentage : defaultValue; + } + public static boolean readUseFullscreenMode(final Resources res) { return res.getBoolean(R.bool.config_use_fullscreen_mode); } |