aboutsummaryrefslogtreecommitdiffstats
path: root/java/res
diff options
context:
space:
mode:
Diffstat (limited to 'java/res')
-rw-r--r--java/res/values/attrs.xml42
-rw-r--r--java/res/values/dimens.xml2
-rw-r--r--java/res/values/styles.xml18
3 files changed, 30 insertions, 32 deletions
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index cced45d9f..76e76cc82 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -41,26 +41,24 @@
checkable+checked+pressed. -->
<attr name="keyBackground" format="reference" />
- <!-- Size of the text for one letter keys. If not defined, keyLetterRatio takes effect. -->
- <attr name="keyLetterSize" format="dimension" />
- <!-- Size of the text for keys with multiple letters. If not defined, keyLabelRatio takes
- effect. -->
- <attr name="keyLabelSize" format="dimension" />
- <!-- Size of the text for one letter keys, in the proportion of key height. -->
- <attr name="keyLetterRatio" format="float" />
+ <!-- Size of the text for one letter keys. If specified as fraction, the text size is
+ measured in the proportion of key height. -->
+ <attr name="keyLetterSize" format="dimension|fraction" />
+ <!-- Size of the text for keys with multiple letters. If specified as fraction, the text
+ size is measured in the proportion of key height. -->
+ <attr name="keyLabelSize" format="dimension|fraction" />
<!-- Large size of the text for one letter keys, in the proportion of key height. -->
- <attr name="keyLargeLetterRatio" format="float" />
- <!-- Size of the text for keys with multiple letters, in the proportion of key height. -->
- <attr name="keyLabelRatio" format="float" />
+ <attr name="keyLargeLetterRatio" format="fraction" />
<!-- Large size of the text for keys with multiple letters, in the proportion of key height. -->
- <attr name="keyLargeLabelRatio" format="float" />
+ <attr name="keyLargeLabelRatio" format="fraction" />
<!-- Size of the text for hint letter (= one character hint label), in the proportion of
key height. -->
- <attr name="keyHintLetterRatio" format="float" />
+ <attr name="keyHintLetterRatio" format="fraction" />
<!-- Size of the text for hint label, in the proportion of key height. -->
- <attr name="keyHintLabelRatio" format="float" />
+ <attr name="keyHintLabelRatio" format="fraction" />
<!-- Size of the text for shifted letter hint, in the proportion of key height. -->
- <attr name="keyShiftedLetterHintRatio" format="float" />
+ <attr name="keyShiftedLetterHintRatio" format="dimension|fraction" />
+
<!-- Horizontal padding of left/right aligned key label to the edge of the key. -->
<attr name="keyLabelHorizontalPadding" format="dimension" />
<!-- Right padding of hint letter to the edge of the key.-->
@@ -96,8 +94,8 @@
<attr name="keyPreviewOffset" format="dimension" />
<!-- Height of the key press feedback popup. -->
<attr name="keyPreviewHeight" format="dimension" />
- <!-- Size of the text for key press feedback popup, int the proportion of key height -->
- <attr name="keyPreviewTextRatio" format="float" />
+ <!-- Size of the text for key press feedback popup, in the proportion of key height. -->
+ <attr name="keyPreviewTextRatio" format="fraction" />
<!-- Delay after key releasing and key press feedback dismissing in millisecond -->
<attr name="keyPreviewLingerTimeout" format="integer" />
@@ -187,13 +185,13 @@
<attr name="colorTypedWord" format="color" />
<attr name="colorAutoCorrect" format="color" />
<attr name="colorSuggested" format="color" />
- <attr name="alphaValidTypedWord" format="integer" />
- <attr name="alphaTypedWord" format="integer" />
- <attr name="alphaAutoCorrect" format="integer" />
- <attr name="alphaSuggested" format="integer" />
- <attr name="alphaObsoleted" format="integer" />
+ <attr name="alphaValidTypedWord" format="fraction" />
+ <attr name="alphaTypedWord" format="fraction" />
+ <attr name="alphaAutoCorrect" format="fraction" />
+ <attr name="alphaSuggested" format="fraction" />
+ <attr name="alphaObsoleted" format="fraction" />
<attr name="suggestionsCountInStrip" format="integer" />
- <attr name="centerSuggestionPercentile" format="integer" />
+ <attr name="centerSuggestionPercentile" format="fraction" />
<attr name="maxMoreSuggestionsRow" format="integer" />
<attr name="minMoreSuggestionsWidth" format="float" />
</declare-styleable>
diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml
index 020d2a99a..4fd942b14 100644
--- a/java/res/values/dimens.xml
+++ b/java/res/values/dimens.xml
@@ -92,7 +92,7 @@
<dimen name="suggestion_text_size">18dp</dimen>
<dimen name="more_suggestions_hint_text_size">27dp</dimen>
<integer name="suggestions_count_in_strip">3</integer>
- <integer name="center_suggestion_percentile">36</integer>
+ <fraction name="center_suggestion_percentile">36%</fraction>
<!-- Gesture preview parameters -->
<dimen name="gesture_preview_trail_width">2.5dp</dimen>
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index e5e7fed80..0220c836e 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -35,9 +35,9 @@
<style name="KeyboardView">
<item name="android:background">@drawable/keyboard_background</item>
<item name="keyBackground">@drawable/btn_keyboard_key</item>
- <item name="keyLetterRatio">@fraction/key_letter_ratio</item>
+ <item name="keyLetterSize">@fraction/key_letter_ratio</item>
<item name="keyLargeLetterRatio">@fraction/key_large_letter_ratio</item>
- <item name="keyLabelRatio">@fraction/key_label_ratio</item>
+ <item name="keyLabelSize">@fraction/key_label_ratio</item>
<item name="keyLargeLabelRatio">@fraction/key_large_label_ratio</item>
<item name="keyHintLetterRatio">@fraction/key_hint_letter_ratio</item>
<item name="keyHintLabelRatio">@fraction/key_hint_label_ratio</item>
@@ -138,9 +138,9 @@
<item name="colorTypedWord">@android:color/white</item>
<item name="colorAutoCorrect">#FFFCAE00</item>
<item name="colorSuggested">#FFFCAE00</item>
- <item name="alphaObsoleted">50</item>
+ <item name="alphaObsoleted">50%</item>
<item name="suggestionsCountInStrip">@integer/suggestions_count_in_strip</item>
- <item name="centerSuggestionPercentile">@integer/center_suggestion_percentile</item>
+ <item name="centerSuggestionPercentile">@fraction/center_suggestion_percentile</item>
<item name="maxMoreSuggestionsRow">@integer/max_more_suggestions_row</item>
<item name="minMoreSuggestionsWidth">@fraction/min_more_suggestions_width</item>
</style>
@@ -373,12 +373,12 @@
<item name="colorTypedWord">@android:color/holo_blue_light</item>
<item name="colorAutoCorrect">@android:color/holo_blue_light</item>
<item name="colorSuggested">@android:color/holo_blue_light</item>
- <item name="alphaValidTypedWord">85</item>
- <item name="alphaTypedWord">85</item>
- <item name="alphaSuggested">70</item>
- <item name="alphaObsoleted">70</item>
+ <item name="alphaValidTypedWord">85%</item>
+ <item name="alphaTypedWord">85%</item>
+ <item name="alphaSuggested">70%</item>
+ <item name="alphaObsoleted">70%</item>
<item name="suggestionsCountInStrip">@integer/suggestions_count_in_strip</item>
- <item name="centerSuggestionPercentile">@integer/center_suggestion_percentile</item>
+ <item name="centerSuggestionPercentile">@fraction/center_suggestion_percentile</item>
<item name="maxMoreSuggestionsRow">@integer/max_more_suggestions_row</item>
<item name="minMoreSuggestionsWidth">@fraction/min_more_suggestions_width</item>
</style>