Manual merge of the following Gingerbread changes logically

I8b38e280
Ia3929bb0
If925b546
I1062763d
I901e36aa

bug: 3100311
Change-Id: Ic7e01277ec816e77d34732599b2b9552668b81c2
main
Ken Wakasa 2010-10-20 00:18:50 +09:00
parent 58bfa35072
commit e354a85ef4
31 changed files with 1301 additions and 339 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

View File

@ -18,10 +18,10 @@
*/ */
--> -->
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android" <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
android:keyWidth="9.45%p" latin:keyWidth="9.45%p"
android:horizontalGap="0px" latin:horizontalGap="0px"
android:verticalGap="0px" latin:verticalGap="0px"
android:keyHeight="@dimen/popup_key_height" latin:keyHeight="@dimen/popup_key_height"
> >
</Keyboard> </Keyboard>

View File

@ -40,6 +40,7 @@
latin:keyWidth="40%p" /> latin:keyWidth="40%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:codes="@integer/key_return" latin:codes="@integer/key_return"
@ -59,7 +60,7 @@
latin:keyWidth="20%p" latin:keyWidth="20%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="/" /> latin:codes="@integer/key_f1" />
<Key <Key
latin:codes="@integer/key_space" latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space" latin:keyIcon="@drawable/sym_bkeyboard_space"
@ -67,6 +68,7 @@
latin:keyWidth="40%p" /> latin:keyWidth="40%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:codes="@integer/key_return" latin:codes="@integer/key_return"
@ -86,7 +88,7 @@
latin:keyWidth="20%p" latin:keyWidth="20%p"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="\@" /> latin:codes="@integer/key_f1" />
<Key <Key
latin:codes="@integer/key_space" latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space" latin:keyIcon="@drawable/sym_bkeyboard_space"
@ -94,6 +96,7 @@
latin:keyWidth="40%p" /> latin:keyWidth="40%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:codes="@integer/key_return" latin:codes="@integer/key_return"
@ -121,10 +124,12 @@
latin:keyWidth="40%p" /> latin:keyWidth="40%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:keyLabel=":-)" latin:keyLabel=":-)"
latin:keyOutputText=":-) " latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys" latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="20%p" latin:keyWidth="20%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
@ -153,6 +158,7 @@
latin:keyWidth="20%p" /> latin:keyWidth="20%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:codes="@integer/key_return" latin:codes="@integer/key_return"
@ -184,6 +190,7 @@
latin:keyWidth="30%p" /> latin:keyWidth="30%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:codes="@integer/key_return" latin:codes="@integer/key_return"
@ -207,7 +214,7 @@
latin:keyIcon="@drawable/sym_bkeyboard_settings" latin:keyIcon="@drawable/sym_bkeyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" /> latin:iconPreview="@drawable/sym_keyboard_feedback_settings" />
<Key <Key
latin:keyLabel="/" /> latin:codes="@integer/key_f1" />
<Key <Key
latin:codes="@integer/key_space" latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space" latin:keyIcon="@drawable/sym_bkeyboard_space"
@ -215,6 +222,7 @@
latin:keyWidth="30%p" /> latin:keyWidth="30%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:codes="@integer/key_return" latin:codes="@integer/key_return"
@ -238,7 +246,7 @@
latin:keyIcon="@drawable/sym_bkeyboard_settings" latin:keyIcon="@drawable/sym_bkeyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" /> latin:iconPreview="@drawable/sym_keyboard_feedback_settings" />
<Key <Key
latin:keyLabel="\@" /> latin:codes="@integer/key_f1" />
<Key <Key
latin:codes="@integer/key_space" latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space" latin:keyIcon="@drawable/sym_bkeyboard_space"
@ -246,6 +254,7 @@
latin:keyWidth="30%p" /> latin:keyWidth="30%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:codes="@integer/key_return" latin:codes="@integer/key_return"
@ -277,10 +286,12 @@
latin:keyWidth="30%p" /> latin:keyWidth="30%p" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:keyLabel=":-)" latin:keyLabel=":-)"
latin:keyOutputText=":-) " latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys" latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="25%p" latin:keyWidth="25%p"
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
@ -312,6 +323,7 @@
latin:iconPreview="@drawable/sym_keyboard_feedback_tab" /> latin:iconPreview="@drawable/sym_keyboard_feedback_tab" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" /> latin:popupKeyboard="@xml/popup_punctuation" />
<Key <Key
latin:codes="@integer/key_return" latin:codes="@integer/key_return"

View File

@ -43,6 +43,7 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
@ -65,7 +66,7 @@
latin:isModifier="true" latin:isModifier="true"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="/" latin:codes="@integer/key_f1"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:codes="@integer/key_space" latin:codes="@integer/key_space"
@ -75,6 +76,7 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
@ -97,7 +99,7 @@
latin:isModifier="true" latin:isModifier="true"
latin:keyEdgeFlags="left" /> latin:keyEdgeFlags="left" />
<Key <Key
latin:keyLabel="\@" latin:codes="@integer/key_f1"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:codes="@integer/key_space" latin:codes="@integer/key_space"
@ -107,6 +109,7 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
@ -139,11 +142,13 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel=":-)" latin:keyLabel=":-)"
latin:keyOutputText=":-) " latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys" latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="20%p" latin:keyWidth="20%p"
latin:isModifier="true" latin:isModifier="true"
@ -177,6 +182,7 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
@ -214,6 +220,7 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
@ -241,7 +248,7 @@
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" latin:iconPreview="@drawable/sym_keyboard_feedback_settings"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="/" latin:codes="@integer/key_f1"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:codes="@integer/key_space" latin:codes="@integer/key_space"
@ -251,6 +258,7 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
@ -278,7 +286,7 @@
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" latin:iconPreview="@drawable/sym_keyboard_feedback_settings"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="\@" latin:codes="@integer/key_f1"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:codes="@integer/key_space" latin:codes="@integer/key_space"
@ -288,6 +296,7 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
@ -325,11 +334,13 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel=":-)" latin:keyLabel=":-)"
latin:keyOutputText=":-) " latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys" latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="25%p" latin:keyWidth="25%p"
latin:isModifier="true" latin:isModifier="true"
@ -367,6 +378,7 @@
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key
latin:keyLabel="." latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" /> latin:isModifier="true" />
<Key <Key

View File

@ -143,70 +143,63 @@
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyboardMode="@+id/mode_symbols" latin:keyboardMode="@+id/mode_symbols_normal"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_row4_common" />
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_f1"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p"
latin:isModifier="true" />
<Key
latin:keyLabel="."
latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_keyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyboardMode="@+id/mode_symbols_with_settings_key" latin:keyboardMode="@+id/mode_symbols_url"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_row4_common" />
latin:codes="@integer/key_symbol" </Row>
latin:keyLabel="@string/label_alpha_key" <Row
latin:keyWidth="15%p" latin:keyboardMode="@+id/mode_symbols_email"
latin:isModifier="true" latin:rowEdgeFlags="bottom"
latin:keyEdgeFlags="left" /> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_row4_common" />
latin:codes="@integer/key_settings" </Row>
latin:keyIcon="@drawable/sym_keyboard_settings" <Row
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" latin:keyboardMode="@+id/mode_symbols_im"
latin:isModifier="true" /> latin:rowEdgeFlags="bottom"
<Key >
latin:codes="@integer/key_f1" <include latin:keyboardLayout="@xml/kbd_symbols_row4_im" />
latin:isModifier="true" /> </Row>
<Key <Row
latin:codes="@integer/key_space" latin:keyboardMode="@+id/mode_symbols_webentry"
latin:keyIcon="@drawable/sym_keyboard_space" latin:rowEdgeFlags="bottom"
latin:iconPreview="@drawable/sym_keyboard_feedback_space" >
latin:keyWidth="30%p" <include latin:keyboardLayout="@xml/kbd_symbols_row4_common" />
latin:isModifier="true" /> </Row>
<Key <Row
latin:keyLabel="." latin:keyboardMode="@+id/mode_symbols_normal_with_settings_key"
latin:popupKeyboard="@xml/popup_punctuation" latin:rowEdgeFlags="bottom"
latin:isModifier="true" /> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_row4_common_with_settings_key" />
latin:codes="@integer/key_return" </Row>
latin:keyIcon="@drawable/sym_keyboard_return" <Row
latin:iconPreview="@drawable/sym_keyboard_feedback_return" latin:keyboardMode="@+id/mode_symbols_url_with_settings_key"
latin:keyWidth="25%p" latin:rowEdgeFlags="bottom"
latin:isModifier="true" >
latin:keyEdgeFlags="right" /> <include latin:keyboardLayout="@xml/kbd_symbols_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_email_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_im_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_row4_im_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_webentry_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_row4_common_with_settings_key" />
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -142,59 +142,63 @@
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyboardMode="@+id/mode_symbols" latin:keyboardMode="@+id/mode_symbols_normal"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_black_row4_common" />
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_f1" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p" />
<Key
latin:keyLabel="."
latin:popupKeyboard="@xml/popup_punctuation" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_bkeyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyboardMode="@+id/mode_symbols_with_settings_key" latin:keyboardMode="@+id/mode_symbols_url"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_black_row4_common" />
latin:codes="@integer/key_symbol" </Row>
latin:keyLabel="@string/label_alpha_key" <Row
latin:keyWidth="15%p" latin:keyboardMode="@+id/mode_symbols_email"
latin:keyEdgeFlags="left" /> latin:rowEdgeFlags="bottom"
<Key >
latin:codes="@integer/key_settings" <include latin:keyboardLayout="@xml/kbd_symbols_black_row4_common" />
latin:keyIcon="@drawable/sym_bkeyboard_settings" </Row>
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" /> <Row
<Key latin:keyboardMode="@+id/mode_symbols_im"
latin:codes="@integer/key_f1" /> latin:rowEdgeFlags="bottom"
<Key >
latin:codes="@integer/key_space" <include latin:keyboardLayout="@xml/kbd_symbols_black_row4_im" />
latin:keyIcon="@drawable/sym_bkeyboard_space" </Row>
latin:iconPreview="@drawable/sym_keyboard_feedback_space" <Row
latin:keyWidth="30%p" /> latin:keyboardMode="@+id/mode_symbols_webentry"
<Key latin:rowEdgeFlags="bottom"
latin:keyLabel="." >
latin:popupKeyboard="@xml/popup_punctuation" /> <include latin:keyboardLayout="@xml/kbd_symbols_black_row4_common" />
<Key </Row>
latin:codes="@integer/key_return" <Row
latin:keyIcon="@drawable/sym_bkeyboard_return" latin:keyboardMode="@+id/mode_symbols_normal_with_settings_key"
latin:iconPreview="@drawable/sym_keyboard_feedback_return" latin:rowEdgeFlags="bottom"
latin:keyWidth="25%p" >
latin:keyEdgeFlags="right" /> <include latin:keyboardLayout="@xml/kbd_symbols_black_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_url_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_black_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_email_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_black_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_im_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_black_row4_im_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_webentry_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_black_row4_common_with_settings_key" />
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -0,0 +1,46 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_f1" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p" />
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_bkeyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,50 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="15%p"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_bkeyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" />
<Key
latin:codes="@integer/key_f1" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="30%p" />
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_bkeyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="25%p"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,47 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_f1" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p" />
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" />
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,51 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="15%p"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_bkeyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" />
<Key
latin:codes="@integer/key_f1" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="30%p" />
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation" />
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="25%p"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,51 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_f1"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p"
latin:isModifier="true" />
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_keyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,56 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="15%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_f1"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="30%p"
latin:isModifier="true" />
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_keyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="25%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,52 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_f1"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p"
latin:isModifier="true" />
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" />
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,57 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="15%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_f1"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="30%p"
latin:isModifier="true" />
<Key
latin:keyLabel="."
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_punctuation"
latin:isModifier="true" />
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="25%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -122,68 +122,63 @@
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyboardMode="@+id/mode_symbols" latin:keyboardMode="@+id/mode_symbols_normal"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_common" />
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="„"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p"
latin:isModifier="true" />
<Key
latin:keyLabel="…"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_keyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyboardMode="@+id/mode_symbols_with_settings_key" latin:keyboardMode="@+id/mode_symbols_url"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_common" />
latin:codes="@integer/key_symbol" </Row>
latin:keyLabel="@string/label_alpha_key" <Row
latin:keyWidth="15%p" latin:keyboardMode="@+id/mode_symbols_email"
latin:isModifier="true" latin:rowEdgeFlags="bottom"
latin:keyEdgeFlags="left" /> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_common" />
latin:codes="@integer/key_settings" </Row>
latin:keyIcon="@drawable/sym_keyboard_settings" <Row
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" latin:keyboardMode="@+id/mode_symbols_im"
latin:isModifier="true" /> latin:rowEdgeFlags="bottom"
<Key >
latin:keyLabel="„" <include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_im" />
latin:isModifier="true" /> </Row>
<Key <Row
latin:codes="@integer/key_space" latin:keyboardMode="@+id/mode_symbols_webentry"
latin:keyIcon="@drawable/sym_keyboard_space" latin:rowEdgeFlags="bottom"
latin:iconPreview="@drawable/sym_keyboard_feedback_space" >
latin:keyWidth="30%p" <include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_common" />
latin:isModifier="true" /> </Row>
<Key <Row
latin:keyLabel="…" latin:keyboardMode="@+id/mode_symbols_normal_with_settings_key"
latin:isModifier="true" /> latin:rowEdgeFlags="bottom"
<Key >
latin:codes="@integer/key_return" <include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_common_with_settings_key" />
latin:keyIcon="@drawable/sym_keyboard_return" </Row>
latin:iconPreview="@drawable/sym_keyboard_feedback_return" <Row
latin:keyWidth="25%p" latin:keyboardMode="@+id/mode_symbols_url_with_settings_key"
latin:isModifier="true" latin:rowEdgeFlags="bottom"
latin:keyEdgeFlags="right" /> >
<include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_email_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_im_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_im_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_webentry_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_shift_row4_common_with_settings_key" />
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -121,57 +121,63 @@
latin:keyEdgeFlags="right" /> latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyboardMode="@+id/mode_symbols" latin:keyboardMode="@+id/mode_symbols_normal"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_common" />
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="„" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p" />
<Key
latin:keyLabel="…" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_bkeyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</Row> </Row>
<Row <Row
latin:keyboardMode="@+id/mode_symbols_with_settings_key" latin:keyboardMode="@+id/mode_symbols_url"
latin:rowEdgeFlags="bottom" latin:rowEdgeFlags="bottom"
> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_common" />
latin:codes="@integer/key_symbol" </Row>
latin:keyLabel="@string/label_alpha_key" <Row
latin:keyWidth="15%p" latin:keyboardMode="@+id/mode_symbols_email"
latin:keyEdgeFlags="left" /> latin:rowEdgeFlags="bottom"
<Key >
latin:codes="@integer/key_settings" <include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_common" />
latin:keyIcon="@drawable/sym_bkeyboard_settings" </Row>
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" /> <Row
<Key latin:keyboardMode="@+id/mode_symbols_im"
latin:keyLabel="„" /> latin:rowEdgeFlags="bottom"
<Key >
latin:codes="@integer/key_space" <include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_im" />
latin:keyIcon="@drawable/sym_bkeyboard_space" </Row>
latin:iconPreview="@drawable/sym_keyboard_feedback_space" <Row
latin:keyWidth="30%p" /> latin:keyboardMode="@+id/mode_symbols_webentry"
<Key latin:rowEdgeFlags="bottom"
latin:keyLabel="…" /> >
<Key <include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_common" />
latin:codes="@integer/key_return" </Row>
latin:keyIcon="@drawable/sym_bkeyboard_return" <Row
latin:iconPreview="@drawable/sym_keyboard_feedback_return" latin:keyboardMode="@+id/mode_symbols_normal_with_settings_key"
latin:keyWidth="25%p" latin:rowEdgeFlags="bottom"
latin:keyEdgeFlags="right" /> >
<include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_url_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_email_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_common_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_im_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_im_with_settings_key" />
</Row>
<Row
latin:keyboardMode="@+id/mode_symbols_webentry_with_settings_key"
latin:rowEdgeFlags="bottom"
>
<include latin:keyboardLayout="@xml/kbd_symbols_shift_black_row4_common_with_settings_key" />
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -0,0 +1,44 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="„" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p" />
<Key
latin:keyLabel="…" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_bkeyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,48 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="15%p"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_bkeyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" />
<Key
latin:keyLabel="„" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="30%p" />
<Key
latin:keyLabel="…" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_bkeyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="25%p"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,45 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="„" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p" />
<Key
latin:keyLabel="…" />
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="20%p"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,49 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="15%p"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_bkeyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings" />
<Key
latin:keyLabel="„" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_bkeyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="30%p" />
<Key
latin:keyLabel="…" />
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="25%p"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,49 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="„"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p"
latin:isModifier="true" />
<Key
latin:keyLabel="…"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_keyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,54 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="15%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings"
latin:isModifier="true" />
<Key
latin:keyLabel="„"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="30%p"
latin:isModifier="true" />
<Key
latin:keyLabel="…"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_return"
latin:keyIcon="@drawable/sym_keyboard_return"
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
latin:keyWidth="25%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,50 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="„"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="40%p"
latin:isModifier="true" />
<Key
latin:keyLabel="…"
latin:isModifier="true" />
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="20%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</merge>

View File

@ -0,0 +1,55 @@
<?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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
latin:codes="@integer/key_symbol"
latin:keyLabel="@string/label_alpha_key"
latin:keyWidth="15%p"
latin:isModifier="true"
latin:keyEdgeFlags="left" />
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:iconPreview="@drawable/sym_keyboard_feedback_settings"
latin:isModifier="true" />
<Key
latin:keyLabel="„"
latin:isModifier="true" />
<Key
latin:codes="@integer/key_space"
latin:keyIcon="@drawable/sym_keyboard_space"
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
latin:keyWidth="30%p"
latin:isModifier="true" />
<Key
latin:keyLabel="…"
latin:isModifier="true" />
<Key
latin:keyLabel=":-)"
latin:keyOutputText=":-) "
latin:keyHintIcon="@drawable/hint_popup"
latin:popupKeyboard="@xml/popup_smileys"
latin:keyWidth="25%p"
latin:isModifier="true"
latin:keyEdgeFlags="right" />
</merge>

39
java/res/xml/popup_at.xml Normal file
View File

@ -0,0 +1,39 @@
<?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.
*/
-->
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:keyHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
>
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="\@"
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -0,0 +1,39 @@
<?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.
*/
-->
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="10%p"
latin:horizontalGap="0px"
latin:verticalGap="0px"
latin:keyHeight="@dimen/popup_key_height"
>
<Row
latin:rowEdgeFlags="top|bottom"
>
<Key
latin:codes="@integer/key_settings"
latin:keyIcon="@drawable/sym_keyboard_settings"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="/"
latin:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -29,14 +29,14 @@ import java.util.Locale;
public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceChangeListener { public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceChangeListener {
public static final int MODE_NONE = 0; public static final int MODE_TEXT = 0;
public static final int MODE_TEXT = 1; public static final int MODE_URL = 1;
public static final int MODE_SYMBOLS = 2; public static final int MODE_EMAIL = 2;
public static final int MODE_PHONE = 3; public static final int MODE_IM = 3;
public static final int MODE_URL = 4; public static final int MODE_WEB = 4;
public static final int MODE_EMAIL = 5; public static final int MODE_PHONE = 5;
public static final int MODE_IM = 6;
public static final int MODE_WEB = 7; public static final int MODE_NONE = -1;
// Main keyboard layouts without the settings key // Main keyboard layouts without the settings key
public static final int KEYBOARDMODE_NORMAL = R.id.mode_normal; public static final int KEYBOARDMODE_NORMAL = R.id.mode_normal;
@ -44,6 +44,13 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
public static final int KEYBOARDMODE_EMAIL = R.id.mode_email; public static final int KEYBOARDMODE_EMAIL = R.id.mode_email;
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 int[] QWERTY_MODES = {
KEYBOARDMODE_NORMAL,
KEYBOARDMODE_URL,
KEYBOARDMODE_EMAIL,
KEYBOARDMODE_IM,
KEYBOARDMODE_WEB,
0 /* for MODE_PHONE */ };
// Main keyboard layouts with the settings key // Main keyboard layouts with the settings key
public static final int KEYBOARDMODE_NORMAL_WITH_SETTINGS_KEY = public static final int KEYBOARDMODE_NORMAL_WITH_SETTINGS_KEY =
R.id.mode_normal_with_settings_key; R.id.mode_normal_with_settings_key;
@ -55,12 +62,45 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
R.id.mode_im_with_settings_key; R.id.mode_im_with_settings_key;
public static final int KEYBOARDMODE_WEB_WITH_SETTINGS_KEY = public static final int KEYBOARDMODE_WEB_WITH_SETTINGS_KEY =
R.id.mode_webentry_with_settings_key; R.id.mode_webentry_with_settings_key;
public static final int[] QWERTY_WITH_SETTINGS_KEY_MODES = {
KEYBOARDMODE_NORMAL_WITH_SETTINGS_KEY,
KEYBOARDMODE_URL_WITH_SETTINGS_KEY,
KEYBOARDMODE_EMAIL_WITH_SETTINGS_KEY,
KEYBOARDMODE_IM_WITH_SETTINGS_KEY,
KEYBOARDMODE_WEB_WITH_SETTINGS_KEY,
0 /* for MODE_PHONE */ };
// Symbols keyboard layout without the settings key // Symbols keyboard layouts without the settings key
public static final int KEYBOARDMODE_SYMBOLS = R.id.mode_symbols; public static final int KEYBOARDMODE_SYMBOLS_NORMAL = R.id.mode_symbols_normal;
// Symbols keyboard layout with the settings key public static final int KEYBOARDMODE_SYMBOLS_URL = R.id.mode_symbols_url;
public static final int KEYBOARDMODE_SYMBOLS_WITH_SETTINGS_KEY = public static final int KEYBOARDMODE_SYMBOLS_EMAIL = R.id.mode_symbols_email;
R.id.mode_symbols_with_settings_key; public static final int KEYBOARDMODE_SYMBOLS_IM = R.id.mode_symbols_im;
public static final int KEYBOARDMODE_SYMBOLS_WEB = R.id.mode_symbols_webentry;
public static final int[] SYMBOLS_MODES = {
KEYBOARDMODE_SYMBOLS_NORMAL,
KEYBOARDMODE_SYMBOLS_URL,
KEYBOARDMODE_SYMBOLS_EMAIL,
KEYBOARDMODE_SYMBOLS_IM,
KEYBOARDMODE_SYMBOLS_WEB,
0 /* for MODE_PHONE */ };
// Symbols keyboard layouts with the settings key
public static final int KEYBOARDMODE_SYMBOLS_NORMAL_WITH_SETTINGS_KEY =
R.id.mode_symbols_normal_with_settings_key;
public static final int KEYBOARDMODE_SYMBOLS_URL_WITH_SETTINGS_KEY =
R.id.mode_symbols_url_with_settings_key;
public static final int KEYBOARDMODE_SYMBOLS_EMAIL_WITH_SETTINGS_KEY =
R.id.mode_symbols_email_with_settings_key;
public static final int KEYBOARDMODE_SYMBOLS_IM_WITH_SETTINGS_KEY =
R.id.mode_symbols_im_with_settings_key;
public static final int KEYBOARDMODE_SYMBOLS_WEB_WITH_SETTINGS_KEY =
R.id.mode_symbols_webentry_with_settings_key;
public static final int[] SYMBOLS_WITH_SETTINGS_KEY_MODES = {
KEYBOARDMODE_SYMBOLS_NORMAL_WITH_SETTINGS_KEY,
KEYBOARDMODE_SYMBOLS_URL_WITH_SETTINGS_KEY,
KEYBOARDMODE_SYMBOLS_EMAIL_WITH_SETTINGS_KEY,
KEYBOARDMODE_SYMBOLS_IM_WITH_SETTINGS_KEY,
KEYBOARDMODE_SYMBOLS_WEB_WITH_SETTINGS_KEY,
0 /* for MODE_PHONE */ };
public static final String DEFAULT_LAYOUT_ID = "4"; public static final String DEFAULT_LAYOUT_ID = "4";
public static final String PREF_KEYBOARD_LAYOUT = "pref_keyboard_layout_20100902"; public static final String PREF_KEYBOARD_LAYOUT = "pref_keyboard_layout_20100902";
@ -115,7 +155,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
private boolean mIsAutoCompletionActive; private boolean mIsAutoCompletionActive;
private boolean mHasVoice; private boolean mHasVoice;
private boolean mVoiceOnPrimary; private boolean mVoiceOnPrimary;
private boolean mPreferSymbols;
private int mSymbolsModeState = SYMBOLS_MODE_STATE_NONE; private int mSymbolsModeState = SYMBOLS_MODE_STATE_NONE;
// Indicates whether or not we have the settings key // Indicates whether or not we have the settings key
@ -158,21 +197,26 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
} }
private KeyboardId makeSymbolsId(boolean hasVoice) { private KeyboardId makeSymbolsId(boolean hasVoice) {
final int mode = mMode == MODE_NONE ? MODE_TEXT : mMode;
return new KeyboardId(KBD_SYMBOLS[getCharColorId()], mHasSettingsKey ? return new KeyboardId(KBD_SYMBOLS[getCharColorId()], mHasSettingsKey ?
KEYBOARDMODE_SYMBOLS_WITH_SETTINGS_KEY : KEYBOARDMODE_SYMBOLS, SYMBOLS_WITH_SETTINGS_KEY_MODES[mode] : SYMBOLS_MODES[mode],
false, hasVoice); false, hasVoice);
} }
private KeyboardId makeSymbolsShiftedId(boolean hasVoice) { private KeyboardId makeSymbolsShiftedId(boolean hasVoice) {
final int mode = mMode == MODE_NONE ? MODE_TEXT : mMode;
return new KeyboardId(KBD_SYMBOLS_SHIFT[getCharColorId()], mHasSettingsKey ? return new KeyboardId(KBD_SYMBOLS_SHIFT[getCharColorId()], mHasSettingsKey ?
KEYBOARDMODE_SYMBOLS_WITH_SETTINGS_KEY : KEYBOARDMODE_SYMBOLS, SYMBOLS_WITH_SETTINGS_KEY_MODES[mode] : SYMBOLS_MODES[mode],
false, hasVoice); false, hasVoice);
} }
public void makeKeyboards(boolean forceCreate) { private void makeSymbolsKeyboardIds() {
mSymbolsId = makeSymbolsId(mHasVoice && !mVoiceOnPrimary); mSymbolsId = makeSymbolsId(mHasVoice && !mVoiceOnPrimary);
mSymbolsShiftedId = makeSymbolsShiftedId(mHasVoice && !mVoiceOnPrimary); mSymbolsShiftedId = makeSymbolsShiftedId(mHasVoice && !mVoiceOnPrimary);
}
public void makeKeyboards(boolean forceCreate) {
makeSymbolsKeyboardIds();
if (forceCreate) mKeyboards.clear(); if (forceCreate) mKeyboards.clear();
// Configuration change is coming after the keyboard gets recreated. So don't rely on that. // Configuration change is coming after the keyboard gets recreated. So don't rely on that.
// If keyboards have already been made, check if we have a screen width change and // If keyboards have already been made, check if we have a screen width change and
@ -207,10 +251,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
}); });
} }
public KeyboardId(int xml, boolean hasVoice) {
this(xml, 0, false, hasVoice);
}
@Override @Override
public boolean equals(Object other) { public boolean equals(Object other) {
return other instanceof KeyboardId && equals((KeyboardId) other); return other instanceof KeyboardId && equals((KeyboardId) other);
@ -244,14 +284,10 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
public void setKeyboardMode(int mode, int imeOptions, boolean enableVoice) { public void setKeyboardMode(int mode, int imeOptions, boolean enableVoice) {
mSymbolsModeState = SYMBOLS_MODE_STATE_NONE; mSymbolsModeState = SYMBOLS_MODE_STATE_NONE;
mPreferSymbols = mode == MODE_SYMBOLS;
if (mode == MODE_SYMBOLS) {
mode = MODE_TEXT;
}
try { try {
setKeyboardMode(mode, imeOptions, enableVoice, mPreferSymbols); setKeyboardMode(mode, imeOptions, enableVoice, false);
} catch (RuntimeException e) { } catch (RuntimeException e) {
LatinImeLogger.logOnException(mode + "," + imeOptions + "," + mPreferSymbols, e); LatinImeLogger.logOnException(mode + "," + imeOptions, e);
} }
} }
@ -259,8 +295,10 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
if (mInputView == null) return; if (mInputView == null) return;
mMode = mode; mMode = mode;
mImeOptions = imeOptions; mImeOptions = imeOptions;
makeSymbolsKeyboardIds();
if (enableVoice != mHasVoice) { if (enableVoice != mHasVoice) {
setVoiceMode(mHasVoice, mVoiceOnPrimary); // TODO clean up this unnecessary recursive call.
setVoiceMode(enableVoice, mVoiceOnPrimary);
} }
mIsSymbols = isSymbols; mIsSymbols = isSymbols;
@ -277,7 +315,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
mInputView.setKeyboard(keyboard); mInputView.setKeyboard(keyboard);
keyboard.setShifted(false); keyboard.setShifted(false);
keyboard.setShiftLocked(keyboard.isShiftLocked()); keyboard.setShiftLocked(keyboard.isShiftLocked());
keyboard.setImeOptions(mInputMethodService.getResources(), mMode, imeOptions); keyboard.setImeOptions(mInputMethodService.getResources(), mode, imeOptions);
keyboard.setColorOfSymbolIcons(mIsAutoCompletionActive, isBlackSym()); keyboard.setColorOfSymbolIcons(mIsAutoCompletionActive, isBlackSym());
// Update the settings key state because number of enabled IMEs could have been changed // Update the settings key state because number of enabled IMEs could have been changed
updateSettingsKeyState(PreferenceManager.getDefaultSharedPreferences(mInputMethodService)); updateSettingsKeyState(PreferenceManager.getDefaultSharedPreferences(mInputMethodService));
@ -309,48 +347,31 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
} }
private KeyboardId getKeyboardId(int mode, int imeOptions, boolean isSymbols) { private KeyboardId getKeyboardId(int mode, int imeOptions, boolean isSymbols) {
boolean hasVoice = hasVoiceButton(isSymbols); final boolean hasVoice = hasVoiceButton(isSymbols);
int charColorId = getCharColorId(); final int charColorId = getCharColorId();
// TODO: generalize for any KeyboardId final int keyboardRowsResId;
int keyboardRowsResId = KBD_QWERTY[charColorId]; final boolean enableShiftLock;
if (isSymbols) { final int keyboardMode;
if (mode == MODE_PHONE) {
return new KeyboardId(KBD_PHONE_SYMBOLS[charColorId], hasVoice); if (mode == MODE_NONE) {
} else {
return new KeyboardId(KBD_SYMBOLS[charColorId], mHasSettingsKey ?
KEYBOARDMODE_SYMBOLS_WITH_SETTINGS_KEY : KEYBOARDMODE_SYMBOLS,
false, hasVoice);
}
}
switch (mode) {
case MODE_NONE:
LatinImeLogger.logOnWarning( LatinImeLogger.logOnWarning(
"getKeyboardId:" + mode + "," + imeOptions + "," + isSymbols); "getKeyboardId:" + mode + "," + imeOptions + "," + isSymbols);
/* fall through */ mode = MODE_TEXT;
case MODE_TEXT:
return new KeyboardId(keyboardRowsResId, mHasSettingsKey ?
KEYBOARDMODE_NORMAL_WITH_SETTINGS_KEY : KEYBOARDMODE_NORMAL,
true, hasVoice);
case MODE_SYMBOLS:
return new KeyboardId(KBD_SYMBOLS[charColorId], mHasSettingsKey ?
KEYBOARDMODE_SYMBOLS_WITH_SETTINGS_KEY : KEYBOARDMODE_SYMBOLS,
false, hasVoice);
case MODE_PHONE:
return new KeyboardId(KBD_PHONE[charColorId], hasVoice);
case MODE_URL:
return new KeyboardId(keyboardRowsResId, mHasSettingsKey ?
KEYBOARDMODE_URL_WITH_SETTINGS_KEY : KEYBOARDMODE_URL, true, hasVoice);
case MODE_EMAIL:
return new KeyboardId(keyboardRowsResId, mHasSettingsKey ?
KEYBOARDMODE_EMAIL_WITH_SETTINGS_KEY : KEYBOARDMODE_EMAIL, true, hasVoice);
case MODE_IM:
return new KeyboardId(keyboardRowsResId, mHasSettingsKey ?
KEYBOARDMODE_IM_WITH_SETTINGS_KEY : KEYBOARDMODE_IM, true, hasVoice);
case MODE_WEB:
return new KeyboardId(keyboardRowsResId, mHasSettingsKey ?
KEYBOARDMODE_WEB_WITH_SETTINGS_KEY : KEYBOARDMODE_WEB, true, hasVoice);
} }
return null; if (isSymbols) {
keyboardRowsResId = mode == MODE_PHONE
? KBD_PHONE_SYMBOLS[charColorId] : KBD_SYMBOLS[charColorId];
enableShiftLock = false;
keyboardMode = mHasSettingsKey
? SYMBOLS_WITH_SETTINGS_KEY_MODES[mode] : SYMBOLS_MODES[mode];
} else { // QWERTY
keyboardRowsResId = mode == MODE_PHONE
? KBD_PHONE[charColorId] : KBD_QWERTY[charColorId];
enableShiftLock = mode == MODE_PHONE ? false : true;
keyboardMode = mHasSettingsKey
? QWERTY_WITH_SETTINGS_KEY_MODES[mode] : QWERTY_MODES[mode];
}
return new KeyboardId(keyboardRowsResId, keyboardMode, enableShiftLock, hasVoice);
} }
public int getKeyboardMode() { public int getKeyboardMode() {
@ -411,7 +432,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
public void toggleSymbols() { public void toggleSymbols() {
setKeyboardMode(mMode, mImeOptions, mHasVoice, !mIsSymbols); setKeyboardMode(mMode, mImeOptions, mHasVoice, !mIsSymbols);
if (mIsSymbols && !mPreferSymbols) { if (mIsSymbols) {
mSymbolsModeState = SYMBOLS_MODE_STATE_BEGIN; mSymbolsModeState = SYMBOLS_MODE_STATE_BEGIN;
} else { } else {
mSymbolsModeState = SYMBOLS_MODE_STATE_NONE; mSymbolsModeState = SYMBOLS_MODE_STATE_NONE;

View File

@ -2333,8 +2333,8 @@ public class LatinIME extends InputMethodService
private boolean shouldShowVoiceButton(FieldContext fieldContext, EditorInfo attribute) { private boolean shouldShowVoiceButton(FieldContext fieldContext, EditorInfo attribute) {
return ENABLE_VOICE_BUTTON && fieldCanDoVoice(fieldContext) return ENABLE_VOICE_BUTTON && fieldCanDoVoice(fieldContext)
&& !(attribute != null && attribute.privateImeOptions != null && !(attribute != null
&& attribute.privateImeOptions.equals(IME_OPTION_NO_MICROPHONE)) && IME_OPTION_NO_MICROPHONE.equals(attribute.privateImeOptions))
&& SpeechRecognizer.isRecognitionAvailable(this); && SpeechRecognizer.isRecognitionAvailable(this);
} }

View File

@ -60,6 +60,7 @@ public class LatinKeyboard extends BaseKeyboard {
private final Drawable mButtonArrowRightIcon; private final Drawable mButtonArrowRightIcon;
private Key mEnterKey; private Key mEnterKey;
private Key mF1Key; private Key mF1Key;
private final Drawable mHintIcon;
private Key mSpaceKey; private Key mSpaceKey;
private Key m123Key; private Key m123Key;
private int mSpaceKeyIndex = -1; private int mSpaceKeyIndex = -1;
@ -69,6 +70,7 @@ public class LatinKeyboard extends BaseKeyboard {
private LanguageSwitcher mLanguageSwitcher; private LanguageSwitcher mLanguageSwitcher;
private final Resources mRes; private final Resources mRes;
private final Context mContext; private final Context mContext;
private int mMode; // TODO: remove this and use the corresponding mode in the parent class
// Whether this keyboard has voice icon on it // Whether this keyboard has voice icon on it
private boolean mHasVoiceButton; private boolean mHasVoiceButton;
// Whether voice icon is enabled at all // Whether voice icon is enabled at all
@ -119,6 +121,7 @@ public class LatinKeyboard extends BaseKeyboard {
super(context, xmlLayoutResId, mode); super(context, xmlLayoutResId, mode);
final Resources res = context.getResources(); final Resources res = context.getResources();
mContext = context; mContext = context;
mMode = mode;
mRes = res; mRes = res;
mShiftLockIcon = res.getDrawable(R.drawable.sym_keyboard_shift_locked); mShiftLockIcon = res.getDrawable(R.drawable.sym_keyboard_shift_locked);
mShiftLockPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_shift_locked); mShiftLockPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_shift_locked);
@ -133,6 +136,7 @@ public class LatinKeyboard extends BaseKeyboard {
mButtonArrowRightIcon = res.getDrawable(R.drawable.sym_keyboard_language_arrows_right); mButtonArrowRightIcon = res.getDrawable(R.drawable.sym_keyboard_language_arrows_right);
m123MicIcon = res.getDrawable(R.drawable.sym_keyboard_123_mic); m123MicIcon = res.getDrawable(R.drawable.sym_keyboard_123_mic);
m123MicPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_123_mic); m123MicPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_123_mic);
mHintIcon = res.getDrawable(R.drawable.hint_popup);
setDefaultBounds(m123MicPreviewIcon); setDefaultBounds(m123MicPreviewIcon);
sSpacebarVerticalCorrection = res.getDimensionPixelOffset( sSpacebarVerticalCorrection = res.getDimensionPixelOffset(
R.dimen.spacebar_vertical_correction); R.dimen.spacebar_vertical_correction);
@ -180,10 +184,12 @@ public class LatinKeyboard extends BaseKeyboard {
key.text = null; key.text = null;
key.iconPreview = null; key.iconPreview = null;
key.icon = null; key.icon = null;
key.hintIcon = null;
key.label = label; key.label = label;
} }
public void setImeOptions(Resources res, int mode, int options) { public void setImeOptions(Resources res, int mode, int options) {
mMode = mode;
if (mEnterKey == null) if (mEnterKey == null)
return; return;
switch (options & (EditorInfo.IME_MASK_ACTION | EditorInfo.IME_FLAG_NO_ENTER_ACTION)) { switch (options & (EditorInfo.IME_MASK_ACTION | EditorInfo.IME_FLAG_NO_ENTER_ACTION)) {
@ -292,7 +298,7 @@ public class LatinKeyboard extends BaseKeyboard {
mMicIcon = mRes.getDrawable(R.drawable.sym_keyboard_mic); mMicIcon = mRes.getDrawable(R.drawable.sym_keyboard_mic);
m123MicIcon = mRes.getDrawable(R.drawable.sym_keyboard_123_mic); m123MicIcon = mRes.getDrawable(R.drawable.sym_keyboard_123_mic);
} }
updateF1Key(); updateDynamicKeys();
if (mSpaceKey != null) { if (mSpaceKey != null) {
updateSpaceBarForLocale(isAutoCompletion, isBlack); updateSpaceBarForLocale(isAutoCompletion, isBlack);
} }
@ -301,11 +307,16 @@ public class LatinKeyboard extends BaseKeyboard {
public void setVoiceMode(boolean hasVoiceButton, boolean hasVoice) { public void setVoiceMode(boolean hasVoiceButton, boolean hasVoice) {
mHasVoiceButton = hasVoiceButton; mHasVoiceButton = hasVoiceButton;
mVoiceEnabled = hasVoice; mVoiceEnabled = hasVoice;
updateDynamicKeys();
}
private void updateDynamicKeys() {
update123Key();
updateF1Key(); updateF1Key();
} }
private void updateF1Key() { private void update123Key() {
if (mF1Key == null) return; // Update KEYCODE_MODE_CHANGE key only on alphabet mode, not on symbol mode.
if (m123Key != null && mIsAlphaKeyboard) { if (m123Key != null && mIsAlphaKeyboard) {
if (mVoiceEnabled && !mHasVoiceButton) { if (mVoiceEnabled && !mHasVoiceButton) {
m123Key.icon = m123MicIcon; m123Key.icon = m123MicIcon;
@ -317,20 +328,50 @@ public class LatinKeyboard extends BaseKeyboard {
m123Key.label = m123Label; m123Key.label = m123Label;
} }
} }
if (mHasVoiceButton && mVoiceEnabled) {
mF1Key.codes = new int[] { LatinKeyboardView.KEYCODE_VOICE };
mF1Key.label = null;
mF1Key.icon = mMicIcon;
mF1Key.iconPreview = mMicPreviewIcon;
mF1Key.popupResId = R.xml.popup_mic;
} else {
mF1Key.label = ",";
mF1Key.codes = new int[] { ',' };
mF1Key.icon = null;
mF1Key.iconPreview = null;
mF1Key.popupResId = R.xml.popup_comma;
} }
private void updateF1Key() {
// Update KEYCODE_F1 key. Please note that some keyboard layouts have no F1 key.
if (mF1Key == null)
return;
if (mIsAlphaKeyboard) {
if (mMode == KeyboardSwitcher.MODE_URL) {
setNonMicF1Key(mF1Key, "/", R.xml.popup_slash);
} else if (mMode == KeyboardSwitcher.MODE_EMAIL) {
setNonMicF1Key(mF1Key, "@", R.xml.popup_at);
} else {
if (mVoiceEnabled && mHasVoiceButton) {
setMicF1Key(mF1Key);
} else {
setNonMicF1Key(mF1Key, ",", R.xml.popup_comma);
}
}
} else { // Symbols keyboard
if (mVoiceEnabled && mHasVoiceButton) {
setMicF1Key(mF1Key);
} else {
setNonMicF1Key(mF1Key, ",", R.xml.popup_comma);
}
}
}
private void setMicF1Key(Key key) {
key.label = null;
key.codes = new int[] { LatinKeyboardView.KEYCODE_VOICE };
key.popupResId = R.xml.popup_mic;
key.icon = mMicIcon;
key.hintIcon = mHintIcon;
key.iconPreview = mMicPreviewIcon;
}
private void setNonMicF1Key(Key key, String label, int popupResId) {
key.label = label;
key.codes = new int[] { label.charAt(0) };
key.popupResId = popupResId;
key.icon = null;
key.hintIcon = mHintIcon;
key.iconPreview = null;
} }
/** /**

View File

@ -57,6 +57,8 @@ import java.util.WeakHashMap;
* A view that renders a virtual {@link LatinKeyboard}. It handles rendering of keys and * A view that renders a virtual {@link LatinKeyboard}. It handles rendering of keys and
* detecting key presses and touch movements. * detecting key presses and touch movements.
* *
* TODO: References to LatinKeyboard in this class should be replaced with ones to its base class.
*
* @attr ref R.styleable#LatinKeyboardBaseView_keyBackground * @attr ref R.styleable#LatinKeyboardBaseView_keyBackground
* @attr ref R.styleable#LatinKeyboardBaseView_keyPreviewLayout * @attr ref R.styleable#LatinKeyboardBaseView_keyPreviewLayout
* @attr ref R.styleable#LatinKeyboardBaseView_keyPreviewOffset * @attr ref R.styleable#LatinKeyboardBaseView_keyPreviewOffset
@ -160,7 +162,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
// Miscellaneous constants // Miscellaneous constants
/* package */ static final int NOT_A_KEY = -1; /* package */ static final int NOT_A_KEY = -1;
private static final int[] LONG_PRESSABLE_STATE_SET = { android.R.attr.state_long_pressable }; private static final int[] LONG_PRESSABLE_STATE_SET = { android.R.attr.state_long_pressable };
private static final int NUMBER_HINT_VERTICAL_ADJUSTMENT_PIXEL = -1; private static final int HINT_ICON_VERTICAL_ADJUSTMENT_PIXEL = -1;
// XML attribute // XML attribute
private int mKeyTextSize; private int mKeyTextSize;
@ -861,32 +863,20 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
// Turn off drop shadow // Turn off drop shadow
paint.setShadowLayer(0, 0, 0, 0); paint.setShadowLayer(0, 0, 0, 0);
} }
Drawable icon = null; if (key.label == null && key.icon != null) {
if (key.label == null && key.icon != null) int drawableWidth = key.icon.getIntrinsicWidth();
icon = key.icon; int drawableHeight = key.icon.getIntrinsicHeight();
if (icon == null && key.hintIcon != null && drawHintIcon) int drawableX = (key.width + padding.left - padding.right - drawableWidth) / 2;
icon = key.hintIcon; int drawableY = (key.height + padding.top - padding.bottom - drawableHeight) / 2;
if (icon != null) { drawIcon(canvas, key.icon, drawableX, drawableY, drawableWidth, drawableHeight);
// Special handing for the upper-right number hint icons
final int drawableWidth;
final int drawableHeight;
final int drawableX;
final int drawableY;
if (icon == key.hintIcon) {
drawableWidth = key.width;
drawableHeight = key.height;
drawableX = 0;
drawableY = NUMBER_HINT_VERTICAL_ADJUSTMENT_PIXEL;
} else {
drawableWidth = key.icon.getIntrinsicWidth();
drawableHeight = key.icon.getIntrinsicHeight();
drawableX = (key.width + padding.left - padding.right - drawableWidth) / 2;
drawableY = (key.height + padding.top - padding.bottom - drawableHeight) / 2;
} }
canvas.translate(drawableX, drawableY); if (key.hintIcon != null && drawHintIcon) {
icon.setBounds(0, 0, drawableWidth, drawableHeight); int drawableWidth = key.width;
icon.draw(canvas); int drawableHeight = key.height;
canvas.translate(-drawableX, -drawableY); int drawableX = 0;
int drawableY = HINT_ICON_VERTICAL_ADJUSTMENT_PIXEL;
drawIcon(canvas, key.hintIcon, drawableX, drawableY, drawableWidth, drawableHeight);
} }
canvas.translate(-key.x - kbdPaddingLeft, -key.y - kbdPaddingTop); canvas.translate(-key.x - kbdPaddingLeft, -key.y - kbdPaddingTop);
} }
@ -920,6 +910,13 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
mDirtyRect.setEmpty(); mDirtyRect.setEmpty();
} }
private void drawIcon(Canvas canvas, Drawable icon, int x, int y, int width, int height) {
canvas.translate(x, y);
icon.setBounds(0, 0, width, height);
icon.draw(canvas);
canvas.translate(-x, -y);
}
public void setForeground(boolean foreground) { public void setForeground(boolean foreground) {
mInForeground = foreground; mInForeground = foreground;
} }
@ -962,8 +959,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
// WindowManager.BadTokenException. // WindowManager.BadTokenException.
if (key == null || !mInForeground) if (key == null || !mInForeground)
return; return;
// Should not draw number hint icons if (key.icon != null) {
if (key.icon != null && key.label == null) {
mPreviewText.setCompoundDrawables(null, null, null, mPreviewText.setCompoundDrawables(null, null, null,
key.iconPreview != null ? key.iconPreview : key.icon); key.iconPreview != null ? key.iconPreview : key.icon);
mPreviewText.setText(null); mPreviewText.setText(null);