aboutsummaryrefslogtreecommitdiffstats
path: root/java/res
diff options
context:
space:
mode:
Diffstat (limited to 'java/res')
-rw-r--r--java/res/layout/vibration_settings_dialog.xml49
-rw-r--r--java/res/values/attrs.xml4
-rw-r--r--java/res/values/donottranslate.xml1
-rw-r--r--java/res/values/strings.xml2
-rw-r--r--java/res/values/themes-basic-highcontrast.xml1
-rw-r--r--java/res/values/themes-basic.xml1
-rw-r--r--java/res/values/themes-gingerbread.xml1
-rw-r--r--java/res/values/themes-ics.xml1
-rw-r--r--java/res/values/themes-stone-bold.xml1
-rw-r--r--java/res/values/themes-stone.xml1
-rw-r--r--java/res/values/touch-position-correction.xml74
-rw-r--r--java/res/xml/prefs.xml3
12 files changed, 138 insertions, 1 deletions
diff --git a/java/res/layout/vibration_settings_dialog.xml b/java/res/layout/vibration_settings_dialog.xml
new file mode 100644
index 000000000..981ba9be0
--- /dev/null
+++ b/java/res/layout/vibration_settings_dialog.xml
@@ -0,0 +1,49 @@
+<?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>
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 2a7632124..34ce527f1 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -34,7 +34,9 @@
<attr name="moreSuggestionsViewStyle" format="reference" />
<attr name="suggestionBackgroundStyle" format="reference" />
<attr name="suggestionPreviewBackgroundStyle" format="reference" />
- </declare-styleable>
+ <!-- Touch position correction -->
+ <attr name="touchPositionCorrectionData" format="reference" />
+ </declare-styleable>
<declare-styleable name="KeyboardView">
<!-- Image for the key. This image needs to be a StateListDrawable, with the following
diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml
index 75e22ddd8..aefaec9ef 100644
--- a/java/res/values/donottranslate.xml
+++ b/java/res/values/donottranslate.xml
@@ -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>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 2f591fdf0..a1c1a9ffd 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -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>
diff --git a/java/res/values/themes-basic-highcontrast.xml b/java/res/values/themes-basic-highcontrast.xml
index 91272356f..bc3c84706 100644
--- a/java/res/values/themes-basic-highcontrast.xml
+++ b/java/res/values/themes-basic-highcontrast.xml
@@ -28,5 +28,6 @@
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
<item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_empty</item>
</style>
</resources>
diff --git a/java/res/values/themes-basic.xml b/java/res/values/themes-basic.xml
index 6c0e16e7b..29cb9cc7d 100644
--- a/java/res/values/themes-basic.xml
+++ b/java/res/values/themes-basic.xml
@@ -28,5 +28,6 @@
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
<item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_empty</item>
</style>
</resources>
diff --git a/java/res/values/themes-gingerbread.xml b/java/res/values/themes-gingerbread.xml
index 43bff5082..c4a0f804a 100644
--- a/java/res/values/themes-gingerbread.xml
+++ b/java/res/values/themes-gingerbread.xml
@@ -28,5 +28,6 @@
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
<item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_gingerbread</item>
</style>
</resources>
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index 1235d4e88..dd2b6a334 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -28,5 +28,6 @@
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle.IceCreamSandwich</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle.IceCreamSandwich</item>
<item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle.IceCreamSandwich</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_ice_cream_sandwich</item>
</style>
</resources>
diff --git a/java/res/values/themes-stone-bold.xml b/java/res/values/themes-stone-bold.xml
index 6e25f41d7..6e864bed0 100644
--- a/java/res/values/themes-stone-bold.xml
+++ b/java/res/values/themes-stone-bold.xml
@@ -28,5 +28,6 @@
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
<item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_empty</item>
</style>
</resources>
diff --git a/java/res/values/themes-stone.xml b/java/res/values/themes-stone.xml
index 3cbda810e..64c557035 100644
--- a/java/res/values/themes-stone.xml
+++ b/java/res/values/themes-stone.xml
@@ -28,5 +28,6 @@
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
<item name="suggestionBackgroundStyle">@style/SuggestionBackgroundStyle</item>
<item name="suggestionPreviewBackgroundStyle">@style/SuggestionPreviewBackgroundStyle</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_empty</item>
</style>
</resources>
diff --git a/java/res/values/touch-position-correction.xml b/java/res/values/touch-position-correction.xml
new file mode 100644
index 000000000..0a0e4e545
--- /dev/null
+++ b/java/res/values/touch-position-correction.xml
@@ -0,0 +1,74 @@
+<?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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!--
+ An entry of the touch_position_correction word should be:
+ 1. (float) (touch_center_x - key_center_x) / key_width
+ 2. (float) (touch_center_y - key_center_y) / key_height
+ 3. (float) sweet_spot_radius / (key_width^2 + key_height^2)
+ -->
+
+ <string-array
+ name="touch_position_correction_data_empty"
+ translatable="false"
+ >
+ <!-- empty -->
+ </string-array>
+
+ <string-array
+ name="touch_position_correction_data_gingerbread"
+ translatable="false"
+ >
+ <!-- First row -->
+ <item>0.0091285</item>
+ <item>0.1193203</item>
+ <item>0.1622607</item>
+
+ <!-- Second row -->
+ <item>-0.0233128</item>
+ <item>0.1379798</item>
+ <item>0.1585229</item>
+
+ <!-- Third row -->
+ <item>-0.0080185</item>
+ <item>0.1911477</item>
+ <item>0.1570948</item>
+ </string-array>
+
+ <string-array
+ name="touch_position_correction_data_ice_cream_sandwich"
+ translatable="false"
+ >
+ <!-- First row -->
+ <item>0.0038756</item>
+ <item>-0.0005677</item>
+ <item>0.1577026</item>
+
+ <!-- Second row -->
+ <item>-0.0236678</item>
+ <item>0.0381731</item>
+ <item>0.1529972</item>
+
+ <!-- Third row -->
+ <item>-0.0086827</item>
+ <item>0.0880847</item>
+ <item>0.1522819</item>
+ </string-array>
+</resources> \ No newline at end of file
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index 24de95f10..312af2888 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -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 -->