aboutsummaryrefslogtreecommitdiffstats
path: root/java/res
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-12-18 04:55:17 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-12-18 16:42:23 +0900
commit5afc3ae2d9df0c2c93f2c66af13b128889ac3b5d (patch)
treefe393b02ffdbd3d82124f35a3830859d1bdb69d9 /java/res
parent22b48de11ce6f31a0edf90e1308073e67a7a2adb (diff)
downloadlatinime-5afc3ae2d9df0c2c93f2c66af13b128889ac3b5d.tar.gz
latinime-5afc3ae2d9df0c2c93f2c66af13b128889ac3b5d.tar.xz
latinime-5afc3ae2d9df0c2c93f2c66af13b128889ac3b5d.zip
Add LatinKeyboardView style
As a result, this change moves shortcut related update code to LatinKeyboardView from LatinKeyboard. Change-Id: I1882672577f61e73c90d6c018b7dbb61f3fe21e4
Diffstat (limited to 'java/res')
-rw-r--r--java/res/values/attrs.xml10
-rw-r--r--java/res/values/styles.xml39
-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
8 files changed, 52 insertions, 3 deletions
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 2e8a0030e..62d667878 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -18,10 +18,13 @@
<declare-styleable name="KeyboardTheme">
<!-- Keyboard style -->
<attr name="keyboardStyle" format="reference" />
+ <!-- TODO: Get rid of latinKeyboardStyle -->
<!-- LatinKeyboard style -->
<attr name="latinKeyboardStyle" format="reference" />
<!-- KeyboardView style -->
<attr name="keyboardViewStyle" format="reference" />
+ <!-- LatinKeyboardView style -->
+ <attr name="latinKeyboardViewStyle" format="reference" />
<!-- MiniKeyboard style -->
<attr name="miniKeyboardStyle" format="reference" />
<!-- MiniKeyboardView style -->
@@ -120,6 +123,10 @@
</attr>
</declare-styleable>
+ <declare-styleable name="LatinKeyboardView">
+ <attr name="disabledShortcutIcon" format="reference" />
+ </declare-styleable>
+
<declare-styleable name="SuggestionsView">
<attr name="suggestionStripOption" format="integer">
<!-- This should be aligned with SuggestionsViewParams.AUTO_CORRECT_* and etc. -->
@@ -321,11 +328,10 @@
<attr name="parentStyle" format="string" />
</declare-styleable>
- <!-- Move these attributes to LatinKeyboardView -->
+ <!-- TODO: Move these attributes to LatinKeyboardView -->
<declare-styleable name="LatinKeyboard">
<attr name="autoCorrectionSpacebarLedEnabled" format="boolean" />
<attr name="autoCorrectionSpacebarLedIcon" format="reference" />
- <attr name="disabledShortcutIcon" format="reference" />
<!-- Size of the text for spacebar language label, in the proportion of key height. -->
<attr name="spacebarTextRatio" format="fraction" />
<attr name="spacebarTextColor" format="color" />
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index ed8795ade..b1b39088f 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -72,6 +72,12 @@
<item name="backgroundDimAmount">0.5</item>
</style>
<style
+ name="LatinKeyboardView"
+ parent="KeyboardView">
+ <!-- TODO: Needs non-holo disabled shortcut icon drawable -->
+ <item name="disabledShortcutIcon">@drawable/sym_keyboard_voice_off_holo</item>
+ </style>
+ <style
name="MiniKeyboard"
parent="Keyboard"
>
@@ -134,6 +140,13 @@
<item name="android:background">@android:color/black</item>
<item name="keyBackground">@drawable/btn_keyboard_key3</item>
</style>
+ <style
+ name="LatinKeyboardView.HighContrast"
+ parent="KeyboardView.HighContrast"
+ >
+ <!-- TODO: Needs non-holo disabled shortcut icon drawable -->
+ <item name="disabledShortcutIcon">@drawable/sym_keyboard_voice_off_holo</item>
+ </style>
<!-- Theme "Stone" -->
<style
name="Keyboard.Stone"
@@ -167,6 +180,12 @@
<item name="shadowColor">#FFFFFFFF</item>
</style>
<style
+ name="LatinKeyboardView.Stone"
+ parent="KeyboardView.Stone"
+ >
+ <item name="disabledShortcutIcon">@drawable/sym_bkeyboard_voice_off</item>
+ </style>
+ <style
name="MiniKeyboard.Stone"
parent="Keyboard.Stone"
>
@@ -195,6 +214,12 @@
>
<item name="keyTextStyle">bold</item>
</style>
+ <style
+ name="LatinKeyboardView.Stone.Bold"
+ parent="KeyboardView.Stone.Bold"
+ >
+ <item name="disabledShortcutIcon">@drawable/sym_bkeyboard_voice_off</item>
+ </style>
<!-- Theme "Gingerbread" -->
<style
name="Keyboard.Gingerbread"
@@ -214,6 +239,13 @@
<item name="keyTextStyle">bold</item>
</style>
<style
+ name="LatinKeyboardView.Gingerbread"
+ parent="KeyboardView.Gingerbread"
+ >
+ <!-- TODO: Needs non-holo disabled shortcut icon drawable -->
+ <item name="disabledShortcutIcon">@drawable/sym_keyboard_voice_off_holo</item>
+ </style>
+ <style
name="MiniKeyboard.Gingerbread"
parent="Keyboard.Gingerbread"
>
@@ -244,7 +276,6 @@
parent="LatinKeyboard"
>
<item name="autoCorrectionSpacebarLedEnabled">false</item>
- <item name="disabledShortcutIcon">@drawable/sym_keyboard_voice_off_holo</item>
</style>
<style
name="KeyboardView.IceCreamSandwich"
@@ -270,6 +301,12 @@
<item name="shadowRadius">0.0</item>
</style>
<style
+ name="LatinKeyboardView.IceCreamSandwich"
+ parent="KeyboardView.IceCreamSandwich"
+ >
+ <item name="disabledShortcutIcon">@drawable/sym_keyboard_voice_off_holo</item>
+ </style>
+ <style
name="MiniKeyboard.IceCreamSandwich"
parent="Keyboard.IceCreamSandwich"
>
diff --git a/java/res/values/themes-basic-highcontrast.xml b/java/res/values/themes-basic-highcontrast.xml
index abb7c8057..a1b917057 100644
--- a/java/res/values/themes-basic-highcontrast.xml
+++ b/java/res/values/themes-basic-highcontrast.xml
@@ -19,6 +19,7 @@
<item name="keyboardStyle">@style/Keyboard.HighContrast</item>
<item name="latinKeyboardStyle">@style/LatinKeyboard</item>
<item name="keyboardViewStyle">@style/KeyboardView.HighContrast</item>
+ <item name="latinKeyboardViewStyle">@style/LatinKeyboardView.HighContrast</item>
<item name="miniKeyboardStyle">@style/MiniKeyboard</item>
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView</item>
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>
diff --git a/java/res/values/themes-basic.xml b/java/res/values/themes-basic.xml
index ff9fed55f..1c2db1648 100644
--- a/java/res/values/themes-basic.xml
+++ b/java/res/values/themes-basic.xml
@@ -19,6 +19,7 @@
<item name="keyboardStyle">@style/Keyboard</item>
<item name="latinKeyboardStyle">@style/LatinKeyboard</item>
<item name="keyboardViewStyle">@style/KeyboardView</item>
+ <item name="latinKeyboardViewStyle">@style/LatinKeyboardView</item>
<item name="miniKeyboardStyle">@style/MiniKeyboard</item>
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView</item>
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>
diff --git a/java/res/values/themes-gingerbread.xml b/java/res/values/themes-gingerbread.xml
index be853eb0f..2af3da12e 100644
--- a/java/res/values/themes-gingerbread.xml
+++ b/java/res/values/themes-gingerbread.xml
@@ -19,6 +19,7 @@
<item name="keyboardStyle">@style/Keyboard.Gingerbread</item>
<item name="latinKeyboardStyle">@style/LatinKeyboard</item>
<item name="keyboardViewStyle">@style/KeyboardView.Gingerbread</item>
+ <item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Gingerbread</item>
<item name="miniKeyboardStyle">@style/MiniKeyboard.Gingerbread</item>
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView.Gingerbread</item>
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index 618aaed79..b7898414e 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -19,6 +19,7 @@
<item name="keyboardStyle">@style/Keyboard.IceCreamSandwich</item>
<item name="latinKeyboardStyle">@style/LatinKeyboard.IceCreamSandwich</item>
<item name="keyboardViewStyle">@style/KeyboardView.IceCreamSandwich</item>
+ <item name="latinKeyboardViewStyle">@style/LatinKeyboardView.IceCreamSandwich</item>
<item name="miniKeyboardStyle">@style/MiniKeyboard.IceCreamSandwich</item>
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView.IceCreamSandwich</item>
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle.IceCreamSandwich</item>
diff --git a/java/res/values/themes-stone-bold.xml b/java/res/values/themes-stone-bold.xml
index 532a2985e..cf2cb9100 100644
--- a/java/res/values/themes-stone-bold.xml
+++ b/java/res/values/themes-stone-bold.xml
@@ -19,6 +19,7 @@
<item name="keyboardStyle">@style/Keyboard.Stone.Bold</item>
<item name="latinKeyboardStyle">@style/LatinKeyboard.Stone</item>
<item name="keyboardViewStyle">@style/KeyboardView.Stone.Bold</item>
+ <item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Stone.Bold</item>
<item name="miniKeyboardStyle">@style/MiniKeyboard.Stone</item>
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView.Stone</item>
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>
diff --git a/java/res/values/themes-stone.xml b/java/res/values/themes-stone.xml
index cb3edc58f..be0755f9a 100644
--- a/java/res/values/themes-stone.xml
+++ b/java/res/values/themes-stone.xml
@@ -19,6 +19,7 @@
<item name="keyboardStyle">@style/Keyboard.Stone</item>
<item name="latinKeyboardStyle">@style/LatinKeyboard.Stone</item>
<item name="keyboardViewStyle">@style/KeyboardView.Stone</item>
+ <item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Stone</item>
<item name="miniKeyboardStyle">@style/MiniKeyboard.Stone</item>
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView.Stone</item>
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>