diff options
Diffstat (limited to 'java/res')
-rw-r--r-- | java/res/values/attrs.xml | 4 | ||||
-rw-r--r-- | java/res/values/themes-basic-highcontrast.xml | 1 | ||||
-rw-r--r-- | java/res/values/themes-basic.xml | 1 | ||||
-rw-r--r-- | java/res/values/themes-gingerbread.xml | 1 | ||||
-rw-r--r-- | java/res/values/themes-ics.xml | 1 | ||||
-rw-r--r-- | java/res/values/themes-stone-bold.xml | 1 | ||||
-rw-r--r-- | java/res/values/themes-stone.xml | 1 | ||||
-rw-r--r-- | java/res/values/touch-position-correction.xml | 74 |
8 files changed, 83 insertions, 1 deletions
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/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 |