Add new UI for Gingerbread refering to Heiko's sample

Change-Id: I80db4a52f5bbb25c77dfe7df94bdced69debf831
main
satok 2010-05-26 18:30:31 +09:00
parent 3e5b8b3520
commit b72f348467
13 changed files with 99 additions and 3 deletions

View File

@ -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>

View File

@ -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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

33
java/res/layout/input7.xml Executable file
View File

@ -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"-->

View File

@ -26,4 +26,6 @@
<color name="latinkeyboard_bar_language_text">#FF808080</color> <color name="latinkeyboard_bar_language_text">#FF808080</color>
<color name="latinkeyboard_extension_background">#A0000000</color> <color name="latinkeyboard_extension_background">#A0000000</color>
<color name="latinkeyboard_text_color">#FF000000</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> </resources>

View File

@ -336,6 +336,7 @@
<string name="layout_dazzle" translatable="false">Dazzle</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_blue_ribbon_high" translatable="false">Blue Ribbon (High Contrast)</string>
<string name="layout_dazzle_high" translatable="false">Dazzle (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"> <string-array name="keyboard_layout_modes" translatable="false">
<item>@string/layout_basic</item> <item>@string/layout_basic</item>
@ -344,6 +345,7 @@
<item>@string/layout_blue_ribbon_high</item> <item>@string/layout_blue_ribbon_high</item>
<item>@string/layout_dazzle</item> <item>@string/layout_dazzle</item>
<item>@string/layout_dazzle_high</item> <item>@string/layout_dazzle_high</item>
<item>@string/layout_gingerbread</item>
</string-array> </string-array>
<string-array name="keyboard_layout_modes_values" translatable="false"> <string-array name="keyboard_layout_modes_values" translatable="false">
@ -353,6 +355,7 @@
<item>3</item> <item>3</item>
<item>4</item> <item>4</item>
<item>5</item> <item>5</item>
<item>6</item>
</string-array> </string-array>
<string name="prefs_debug_mode">Debug (Temporary)</string> <string name="prefs_debug_mode">Debug (Temporary)</string>

View File

@ -46,11 +46,11 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
public static final int KEYBOARDMODE_IM = R.id.mode_im; public static final int KEYBOARDMODE_IM = R.id.mode_im;
public static final int KEYBOARDMODE_WEB = R.id.mode_webentry; 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"; public static final String PREF_KEYBOARD_LAYOUT = "keyboard_layout";
private static final int[] LAYOUTS = new int [] { private static final int[] LAYOUTS = new int [] {
R.layout.input, R.layout.input2, R.layout.input3, R.layout.input4, R.layout.input5, 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; private static final int SYMBOLS_MODE_STATE_NONE = 0;

View File

@ -677,7 +677,7 @@ public class LatinKeyboard extends Keyboard {
mTextPaint = new TextPaint(); mTextPaint = new TextPaint();
int textSize = getTextSizeFromTheme(android.R.style.TextAppearance_Medium, 18); int textSize = getTextSizeFromTheme(android.R.style.TextAppearance_Medium, 18);
mTextPaint.setTextSize(textSize); mTextPaint.setTextSize(textSize);
mTextPaint.setColor(0); mTextPaint.setColor(R.color.latinkeyboard_transparent);
mTextPaint.setTextAlign(Align.CENTER); mTextPaint.setTextAlign(Align.CENTER);
mTextPaint.setAlpha(255); mTextPaint.setAlpha(255);
mTextPaint.setAntiAlias(true); mTextPaint.setAntiAlias(true);