Loading java/res/layout/vibration_settings_dialog.xml 0 → 100644 +49 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2011, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="10dip"> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:layout_margin="10dip"> <TextView android:id="@+id/vibration_value" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dip"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/settings_ms" android:textSize="20dip"/> </LinearLayout> <SeekBar android:id="@+id/vibration_settings" android:layout_width="match_parent" android:layout_height="wrap_content" android:max="250" android:layout_margin="10dip"/> </LinearLayout> java/res/values/donottranslate.xml +1 −0 Original line number Diff line number Diff line Loading @@ -165,4 +165,5 @@ <!-- dictionary pack package name /settings activity (for shared prefs and settings) --> <string name="dictionary_pack_package_name">com.google.android.inputmethod.latin.dictionarypack</string> <string name="dictionary_pack_settings_activity">com.google.android.inputmethod.latin.dictionarypack.DictionarySettingsActivity</string> <string name="settings_ms">ms</string> </resources> java/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -343,4 +343,6 @@ <!-- Title of an option for usability study mode --> <string name="prefs_usability_study_mode">Usability study mode</string> <!-- Title of the settings for vibration duration --> <string name="prefs_vibration_duration_settings">Vibration duration settings</string> </resources> java/res/xml/prefs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,9 @@ android:summary="@string/enable_span_insert_summary" android:persistent="true" android:defaultValue="true" /> <PreferenceScreen android:key="pref_vibration_duration_settings" android:title="@string/prefs_vibration_duration_settings"/> <!-- TODO: evaluate results and revive this option. The code already supports it. --> <!-- <CheckBoxPreference --> Loading java/src/com/android/inputmethod/latin/LatinIME.java +1 −10 Original line number Diff line number Diff line Loading @@ -2099,16 +2099,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } private void updateKeypressVibrationDuration() { final String[] durationPerHardwareList = mResources.getStringArray( R.array.keypress_vibration_durations); final String hardwarePrefix = Build.HARDWARE + ","; for (final String element : durationPerHardwareList) { if (element.startsWith(hardwarePrefix)) { mKeypressVibrationDuration = Long.parseLong(element.substring(element.lastIndexOf(',') + 1)); break; } } mKeypressVibrationDuration = Utils.getCurrentVibrationDuration(mPrefs, mResources); } private void playKeyClick(int primaryCode) { Loading Loading
java/res/layout/vibration_settings_dialog.xml 0 → 100644 +49 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2011, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="10dip"> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:layout_margin="10dip"> <TextView android:id="@+id/vibration_value" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dip"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/settings_ms" android:textSize="20dip"/> </LinearLayout> <SeekBar android:id="@+id/vibration_settings" android:layout_width="match_parent" android:layout_height="wrap_content" android:max="250" android:layout_margin="10dip"/> </LinearLayout>
java/res/values/donottranslate.xml +1 −0 Original line number Diff line number Diff line Loading @@ -165,4 +165,5 @@ <!-- dictionary pack package name /settings activity (for shared prefs and settings) --> <string name="dictionary_pack_package_name">com.google.android.inputmethod.latin.dictionarypack</string> <string name="dictionary_pack_settings_activity">com.google.android.inputmethod.latin.dictionarypack.DictionarySettingsActivity</string> <string name="settings_ms">ms</string> </resources>
java/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -343,4 +343,6 @@ <!-- Title of an option for usability study mode --> <string name="prefs_usability_study_mode">Usability study mode</string> <!-- Title of the settings for vibration duration --> <string name="prefs_vibration_duration_settings">Vibration duration settings</string> </resources>
java/res/xml/prefs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,9 @@ android:summary="@string/enable_span_insert_summary" android:persistent="true" android:defaultValue="true" /> <PreferenceScreen android:key="pref_vibration_duration_settings" android:title="@string/prefs_vibration_duration_settings"/> <!-- TODO: evaluate results and revive this option. The code already supports it. --> <!-- <CheckBoxPreference --> Loading
java/src/com/android/inputmethod/latin/LatinIME.java +1 −10 Original line number Diff line number Diff line Loading @@ -2099,16 +2099,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } private void updateKeypressVibrationDuration() { final String[] durationPerHardwareList = mResources.getStringArray( R.array.keypress_vibration_durations); final String hardwarePrefix = Build.HARDWARE + ","; for (final String element : durationPerHardwareList) { if (element.startsWith(hardwarePrefix)) { mKeypressVibrationDuration = Long.parseLong(element.substring(element.lastIndexOf(',') + 1)); break; } } mKeypressVibrationDuration = Utils.getCurrentVibrationDuration(mPrefs, mResources); } private void playKeyClick(int primaryCode) { Loading