Add Keyboard Theme Switcher

Change-Id: If1bf7d20e4f8a47a7c0429d2445431dc73c1b31b
diff --git a/java/res/drawable-hdpi/keyboard_background.9.png b/java/res/drawable-hdpi/keyboard_background_1.9.png
similarity index 100%
rename from java/res/drawable-hdpi/keyboard_background.9.png
rename to java/res/drawable-hdpi/keyboard_background_1.9.png
Binary files differ
diff --git a/java/res/drawable/btn_keyboard_key2.xml b/java/res/drawable/btn_keyboard_key2.xml
new file mode 100644
index 0000000..bd745b7
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key2.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <!-- Toggle keys. Use checkable/checked state. -->
+
+    <item android:state_checkable="true" android:state_checked="true"
+          android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_pressed_on" />
+    <item android:state_checkable="true" android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_fulltrans_pressed" />
+    <item android:state_checkable="true" android:state_checked="true"
+          android:drawable="@drawable/btn_keyboard_key_normal_on" />
+    <item android:state_checkable="true"
+          android:drawable="@drawable/btn_keyboard_key_fulltrans_normal" />
+
+    <!-- Normal keys -->
+
+    <item android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_fulltrans_pressed" />
+    <item android:drawable="@drawable/btn_keyboard_key_fulltrans_normal" />
+</selector>
diff --git a/java/res/drawable/btn_keyboard_key3.xml b/java/res/drawable/btn_keyboard_key3.xml
new file mode 100644
index 0000000..dbe82d5
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key3.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <!-- Toggle keys. Use checkable/checked state. -->
+
+    <item android:state_checkable="true" android:state_checked="true"
+          android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_pressed_on" />
+    <item android:state_checkable="true" android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_fulltrans_normal" />
+    <item android:state_checkable="true" android:state_checked="true"
+          android:drawable="@drawable/btn_keyboard_key_normal_on" />
+    <item android:state_checkable="true"
+          android:drawable="@drawable/btn_keyboard_key_fulltrans_pressed" />
+
+    <!-- Normal keys -->
+
+    <item android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_fulltrans_normal" />
+    <item android:drawable="@drawable/btn_keyboard_key_fulltrans_pressed" />
+</selector>
diff --git a/java/res/drawable/btn_keyboard_toggle_off.png b/java/res/drawable/btn_keyboard_toggle_off.png
new file mode 100644
index 0000000..21399a4
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_toggle_off.png
Binary files differ
diff --git a/java/res/drawable/btn_keyboard_toggle_on.png b/java/res/drawable/btn_keyboard_toggle_on.png
new file mode 100644
index 0000000..22d5683
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_toggle_on.png
Binary files differ
diff --git a/java/res/drawable/keyboard_background_2.jpg b/java/res/drawable/keyboard_background_2.jpg
new file mode 100644
index 0000000..400aa27
--- /dev/null
+++ b/java/res/drawable/keyboard_background_2.jpg
Binary files differ
diff --git a/java/res/drawable/keyboard_background_3.jpg b/java/res/drawable/keyboard_background_3.jpg
new file mode 100644
index 0000000..4e64844
--- /dev/null
+++ b/java/res/drawable/keyboard_background_3.jpg
Binary files differ
diff --git a/java/res/drawable/keyboard_background_4.jpg b/java/res/drawable/keyboard_background_4.jpg
new file mode 100755
index 0000000..5998f48
--- /dev/null
+++ b/java/res/drawable/keyboard_background_4.jpg
Binary files differ
diff --git a/java/res/drawable/keyboard_background_5.jpg b/java/res/drawable/keyboard_background_5.jpg
new file mode 100644
index 0000000..2fe7c5f
--- /dev/null
+++ b/java/res/drawable/keyboard_background_5.jpg
Binary files differ
diff --git a/java/res/layout/input2.xml b/java/res/layout/input2.xml
new file mode 100755
index 0000000..2e90c2c
--- /dev/null
+++ b/java/res/layout/input2.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, 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.
+*/
+-->
+
+<com.android.inputmethod.latin.LatinKeyboardView
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@android:id/keyboardView"
+        android:layout_alignParentBottom="true"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:keyBackground="@drawable/btn_keyboard_key3"
+        android:background="@android:color/black"
+        />
diff --git a/java/res/layout/input3.xml b/java/res/layout/input3.xml
new file mode 100755
index 0000000..a27d09a
--- /dev/null
+++ b/java/res/layout/input3.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, 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.
+*/
+-->
+
+<com.android.inputmethod.latin.LatinKeyboardView
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@android:id/keyboardView"
+        android:layout_alignParentBottom="true"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:keyBackground="@drawable/btn_keyboard_key2"
+        android:background="@drawable/keyboard_background_4"
+        />
diff --git a/java/res/layout/input4.xml b/java/res/layout/input4.xml
new file mode 100755
index 0000000..58dd51e
--- /dev/null
+++ b/java/res/layout/input4.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, 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.
+*/
+-->
+
+<com.android.inputmethod.latin.LatinKeyboardView
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@android:id/keyboardView"
+        android:layout_alignParentBottom="true"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:keyBackground="@drawable/btn_keyboard_key3"
+        android:background="@drawable/keyboard_background_4"
+        />
diff --git a/java/res/layout/input5.xml b/java/res/layout/input5.xml
new file mode 100755
index 0000000..5cd0b8d
--- /dev/null
+++ b/java/res/layout/input5.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, 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.
+*/
+-->
+
+<com.android.inputmethod.latin.LatinKeyboardView
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@android:id/keyboardView"
+        android:layout_alignParentBottom="true"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:keyBackground="@drawable/btn_keyboard_key2"
+        android:background="@drawable/keyboard_background_5"
+        />
diff --git a/java/res/layout/input6.xml b/java/res/layout/input6.xml
new file mode 100755
index 0000000..19197e1
--- /dev/null
+++ b/java/res/layout/input6.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, 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.
+*/
+-->
+
+<com.android.inputmethod.latin.LatinKeyboardView
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@android:id/keyboardView"
+        android:layout_alignParentBottom="true"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:keyBackground="@drawable/btn_keyboard_key3"
+        android:background="@drawable/keyboard_background_5"
+        />
diff --git a/java/res/values/colors.xml b/java/res/values/colors.xml
index d4bb138..6eb362b 100644
--- a/java/res/values/colors.xml
+++ b/java/res/values/colors.xml
@@ -26,4 +26,4 @@
     <color name="latinkeyboard_bar_language_text">#FF808080</color>
     <color name="latinkeyboard_extension_background">#A0000000</color>
     <color name="latinkeyboard_text_color">#FF000000</color>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 83e0adb..5793758 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -328,4 +328,30 @@
     <string name="prefs_enable_log">Enable user feedback</string>
     <!-- Description for sending logs -->
     <string name="prefs_description_log">Help improve this input method editor by automatically sending usage statistics and crash reports to Google.</string>
+
+    <string name="keyboard_layout">Keyboard Theme</string>
+    <string name="layout_basic" translatable="false">Basic</string>
+    <string name="layout_high_contrast" translatable="false">Basic (High Contrast)</string>
+    <string name="layout_blue_ribbon"  translatable="false">Blue Ribbon</string>
+    <string name="layout_dazzle"  translatable="false">Dazzle</string>
+    <string name="layout_blue_ribbon_high"  translatable="false">Blue Ribbon (High Contrast)</string>
+    <string name="layout_dazzle_high"  translatable="false">Dazzle (High Contrast)</string>
+
+    <string-array name="keyboard_layout_modes" translatable="false">
+        <item>@string/layout_basic</item>
+        <item>@string/layout_high_contrast</item>
+        <item>@string/layout_blue_ribbon</item>
+        <item>@string/layout_blue_ribbon_high</item>
+        <item>@string/layout_dazzle</item>
+        <item>@string/layout_dazzle_high</item>
+    </string-array>
+
+    <string-array name="keyboard_layout_modes_values" translatable="false">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+        <item>4</item>
+        <item>5</item>
+    </string-array>
 </resources>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index 7346d02..7dc9a36 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -53,6 +53,15 @@
             android:defaultValue="@string/voice_mode_main"
             />
 
+    <ListPreference
+            android:key="keyboard_layout"
+            android:title="@string/keyboard_layout"
+            android:persistent="true"
+            android:entryValues="@array/keyboard_layout_modes_values"
+            android:entries="@array/keyboard_layout_modes"
+            android:defaultValue="2"
+            />
+
     <PreferenceScreen
             android:title="@string/language_selection_title"
             android:summary="@string/language_selection_summary">
@@ -89,5 +98,5 @@
             android:dependency="show_suggestions"
             />
             
-    </PreferenceCategory>            
+    </PreferenceCategory>
 </PreferenceScreen>