Add new UI for Gingerbread refering to Heiko's sample

Change-Id: I80db4a52f5bbb25c77dfe7df94bdced69debf831
diff --git a/java/res/drawable/background_gradient.xml b/java/res/drawable/background_gradient.xml
new file mode 100644
index 0000000..52e2b16
--- /dev/null
+++ b/java/res/drawable/background_gradient.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <gradient
+        android:startColor="#FF000000"
+        android:endColor="#FF383838"
+        android:angle="90"/>
+</shape>
diff --git a/java/res/drawable/btn_keyboard_key_ginger.xml b/java/res/drawable/btn_keyboard_key_ginger.xml
new file mode 100644
index 0000000..7477037
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_ginger.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_normal_on_ginger" />
+    <item android:state_checkable="true" android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_normal_off_ginger" />
+    <item android:state_checkable="true" android:state_checked="true"
+          android:drawable="@drawable/btn_keyboard_key_normal_on_ginger" />
+    <item android:state_checkable="true"
+          android:drawable="@drawable/btn_keyboard_key_normal_off_ginger" />
+
+    <!-- Normal keys -->
+
+    <item android:state_pressed="true"
+          android:drawable="@drawable/btn_keyboard_key_fulltrans_pressed" />
+    <item android:drawable="@drawable/btn_keyboard_key_normal_ginger" />
+</selector>
diff --git a/java/res/drawable/btn_keyboard_key_normal_ginger.9.png b/java/res/drawable/btn_keyboard_key_normal_ginger.9.png
new file mode 100644
index 0000000..46747bd
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_normal_ginger.9.png
Binary files differ
diff --git a/java/res/drawable/btn_keyboard_key_normal_off_ginger.9.png b/java/res/drawable/btn_keyboard_key_normal_off_ginger.9.png
new file mode 100644
index 0000000..32c8e2e
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_normal_off_ginger.9.png
Binary files differ
diff --git a/java/res/drawable/btn_keyboard_key_normal_on_ginger.9.png b/java/res/drawable/btn_keyboard_key_normal_on_ginger.9.png
new file mode 100644
index 0000000..a9814da
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_normal_on_ginger.9.png
Binary files differ
diff --git a/java/res/drawable/btn_keyboard_normal_metal.9.png b/java/res/drawable/btn_keyboard_normal_metal.9.png
new file mode 100644
index 0000000..f4fe0a8
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_normal_metal.9.png
Binary files differ
diff --git a/java/res/drawable/btn_led_off.9.png b/java/res/drawable/btn_led_off.9.png
new file mode 100644
index 0000000..68ce7a6
--- /dev/null
+++ b/java/res/drawable/btn_led_off.9.png
Binary files differ
diff --git a/java/res/drawable/btn_led_on.9.png b/java/res/drawable/btn_led_on.9.png
new file mode 100644
index 0000000..fe77abb
--- /dev/null
+++ b/java/res/drawable/btn_led_on.9.png
Binary files differ
diff --git a/java/res/layout/input7.xml b/java/res/layout/input7.xml
new file mode 100755
index 0000000..111d87b
--- /dev/null
+++ b/java/res/layout/input7.xml
@@ -0,0 +1,33 @@
+<?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_key_ginger"
+        android:background="@drawable/background_gradient"
+        android:keyTextColor="@color/latinkeyboard_key_color_black"
+        android:shadowColor="@color/latinkeyboard_key_color_white"
+        android:keyTextSize="22dip"
+        />
+<!--         android:keyBackground="@drawable/btn_keyboard_normal_metal"-->
diff --git a/java/res/values/colors.xml b/java/res/values/colors.xml
index 6eb362b..4581cc9 100644
--- a/java/res/values/colors.xml
+++ b/java/res/values/colors.xml
@@ -26,4 +26,6 @@
     <color name="latinkeyboard_bar_language_text">#FF808080</color>
     <color name="latinkeyboard_extension_background">#A0000000</color>
     <color name="latinkeyboard_text_color">#FF000000</color>
+    <color name="latinkeyboard_key_color_white">#FFFFFFFF</color>
+    <color name="latinkeyboard_key_color_black">#FF000000</color>
 </resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index a1b4810..0ba8dc5 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -336,6 +336,7 @@
     <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 name="layout_gingerbread"  translatable="false">Ginger Bread</string>
 
     <string-array name="keyboard_layout_modes" translatable="false">
         <item>@string/layout_basic</item>
@@ -344,6 +345,7 @@
         <item>@string/layout_blue_ribbon_high</item>
         <item>@string/layout_dazzle</item>
         <item>@string/layout_dazzle_high</item>
+        <item>@string/layout_gingerbread</item>
     </string-array>
 
     <string-array name="keyboard_layout_modes_values" translatable="false">
@@ -353,6 +355,7 @@
         <item>3</item>
         <item>4</item>
         <item>5</item>
+        <item>6</item>
     </string-array>
 
     <string name="prefs_debug_mode">Debug (Temporary)</string>
diff --git a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
index 5a271f2..d902619 100644
--- a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java
@@ -46,11 +46,11 @@
     public static final int KEYBOARDMODE_IM = R.id.mode_im;
     public static final int KEYBOARDMODE_WEB = R.id.mode_webentry;
 
-    public static final String DEFAULT_LAYOUT_ID = "3";
+    public static final String DEFAULT_LAYOUT_ID = "6";
     public static final String PREF_KEYBOARD_LAYOUT = "keyboard_layout";
     private static final int[] LAYOUTS = new int [] {
         R.layout.input, R.layout.input2, R.layout.input3, R.layout.input4, R.layout.input5,
-        R.layout.input6
+        R.layout.input6, R.layout.input7
     };
 
     private static final int SYMBOLS_MODE_STATE_NONE = 0;
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboard.java b/java/src/com/android/inputmethod/latin/LatinKeyboard.java
index ea6b74e..c3be252 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboard.java
+++ b/java/src/com/android/inputmethod/latin/LatinKeyboard.java
@@ -677,7 +677,7 @@
             mTextPaint = new TextPaint();
             int textSize = getTextSizeFromTheme(android.R.style.TextAppearance_Medium, 18);
             mTextPaint.setTextSize(textSize);
-            mTextPaint.setColor(0);
+            mTextPaint.setColor(R.color.latinkeyboard_transparent);
             mTextPaint.setTextAlign(Align.CENTER);
             mTextPaint.setAlpha(255);
             mTextPaint.setAntiAlias(true);