Update tablet keyboard layout to the latest design
This change introduces shiftedIcon attribute for Key which specifies icon to draw the shift key while the key is in shifted state. This change also intriduces new configurable dimension value key_label_horizontal_alignment_padding which represents horizontal padding for left or right alignment of key label. Bug: 3216592 Bug: 3201839 Change-Id: I3aa7392227ce573c404517678e6340a8d1fcb328main
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1018 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1004 B |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1018 B |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1004 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1,21 @@
|
||||||
|
<?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">
|
||||||
|
<item android:state_pressed="true"
|
||||||
|
android:drawable="@drawable/btn_keyboard_key_popup_selected_holo" />
|
||||||
|
<item android:drawable="@drawable/btn_keyboard_key_light_popup_normal" />
|
||||||
|
</selector>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?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">
|
||||||
|
<item android:state_long_pressable="true"
|
||||||
|
android:drawable="@drawable/keyboard_key_feedback_more_background" />
|
||||||
|
<item android:drawable="@drawable/keyboard_key_feedback_background_holo" />
|
||||||
|
</selector>
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/keyboard_popup_panel_background_holo"
|
||||||
|
android:paddingLeft="44dip"
|
||||||
|
android:paddingRight="32dip"
|
||||||
|
>
|
||||||
|
<com.android.inputmethod.latin.BaseKeyboardView
|
||||||
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
|
android:id="@+id/BaseKeyboardView"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/latinkeyboard_transparent"
|
||||||
|
|
||||||
|
latin:keyBackground="@drawable/btn_keyboard_key_honeycomb_popup"
|
||||||
|
latin:keyHysteresisDistance="0dip"
|
||||||
|
latin:verticalCorrection="@dimen/mini_keyboard_vertical_correction"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
|
@ -27,9 +27,11 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/keyboard_top_padding"
|
android:paddingTop="@dimen/keyboard_top_padding"
|
||||||
android:paddingBottom="@dimen/keyboard_bottom_padding"
|
android:paddingBottom="@dimen/keyboard_bottom_padding"
|
||||||
android:background="@drawable/keyboard_dark_background"
|
android:background="@drawable/keyboard_background_holo"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
|
||||||
latin:keyBackground="@drawable/btn_keyboard_key_honeycomb"
|
latin:keyBackground="@drawable/btn_keyboard_key_honeycomb"
|
||||||
|
latin:keyPreviewLayout="@layout/key_preview_honeycomb"
|
||||||
|
latin:popupLayout="@layout/keyboard_popup_honeycomb"
|
||||||
latin:keyTextStyle="bold"
|
latin:keyTextStyle="bold"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
**
|
||||||
|
** Copyright 2010, The Android Open Source Project
|
||||||
|
**
|
||||||
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
** you may not use this file except in compliance with the License.
|
||||||
|
** You may obtain a copy of the License at
|
||||||
|
**
|
||||||
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
**
|
||||||
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
|
** limitations under the License.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="80sp"
|
||||||
|
android:textSize="40sp"
|
||||||
|
android:textColor="@color/latinkeyboard_key_color_white"
|
||||||
|
android:minWidth="24dip"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@drawable/keyboard_key_feedback_honeycomb"
|
||||||
|
/>
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/keyboard_popup_panel_background_holo"
|
||||||
|
android:paddingLeft="24dip"
|
||||||
|
android:paddingRight="24dip"
|
||||||
|
>
|
||||||
|
<com.android.inputmethod.latin.BaseKeyboardView
|
||||||
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
|
android:id="@+id/BaseKeyboardView"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/latinkeyboard_transparent"
|
||||||
|
|
||||||
|
latin:keyBackground="@drawable/btn_keyboard_key_honeycomb_popup"
|
||||||
|
latin:keyHysteresisDistance="0dip"
|
||||||
|
latin:verticalCorrection="@dimen/mini_keyboard_vertical_correction"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
|
@ -21,22 +21,24 @@
|
||||||
<resources>
|
<resources>
|
||||||
<!-- key_height + key_bottom_gap = popup_key_height -->
|
<!-- key_height + key_bottom_gap = popup_key_height -->
|
||||||
<dimen name="key_height">13.0mm</dimen>
|
<dimen name="key_height">13.0mm</dimen>
|
||||||
<dimen name="key_bottom_gap">2.0mm</dimen>
|
<dimen name="key_bottom_gap">1.5mm</dimen>
|
||||||
<dimen name="key_horizontal_gap">2.0mm</dimen>
|
<dimen name="key_horizontal_gap">2.0mm</dimen>
|
||||||
<dimen name="popup_key_height">15.0mm</dimen>
|
<dimen name="popup_key_height">15.0mm</dimen>
|
||||||
<dimen name="keyboard_top_padding">1.0mm</dimen>
|
<dimen name="keyboard_top_padding">1.0mm</dimen>
|
||||||
<dimen name="keyboard_bottom_padding">1.0mm</dimen>
|
<dimen name="keyboard_bottom_padding">1.0mm</dimen>
|
||||||
<!-- key_height x 1.6 -->
|
<!-- key_height x 1.0 -->
|
||||||
<dimen name="key_preview_height">20.8mm</dimen>
|
<dimen name="key_preview_height">13.0mm</dimen>
|
||||||
<!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
|
<!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
|
||||||
<!-- popup_key_height x 1.2 -->
|
<!-- popup_key_height x 1.2 -->
|
||||||
<dimen name="mini_keyboard_slide_allowance">15.6mm</dimen>
|
<dimen name="mini_keyboard_slide_allowance">15.6mm</dimen>
|
||||||
<!-- popup_key_height x -1.0 -->
|
<!-- popup_key_height x -1.0 -->
|
||||||
<dimen name="mini_keyboard_vertical_correction">-13.0mm</dimen>
|
<dimen name="mini_keyboard_vertical_correction">-13.0mm</dimen>
|
||||||
|
|
||||||
<dimen name="key_text_size">0.175in</dimen>
|
<dimen name="key_text_size">24dip</dimen>
|
||||||
<dimen name="key_label_text_size">0.110in</dimen>
|
<dimen name="key_label_text_size">18dip</dimen>
|
||||||
<dimen name="key_preview_text_size_large">0.245in</dimen>
|
<dimen name="key_preview_text_size_large">24dip</dimen>
|
||||||
|
<!-- left or right padding for of label alignment -->
|
||||||
|
<dimen name="key_label_horizontal_alignment_padding">18dip</dimen>
|
||||||
|
|
||||||
<dimen name="candidate_strip_height">46dip</dimen>
|
<dimen name="candidate_strip_height">46dip</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -126,6 +126,8 @@
|
||||||
<attr name="manualTemporaryUpperCaseHintIcon" format="reference" />
|
<attr name="manualTemporaryUpperCaseHintIcon" format="reference" />
|
||||||
<!-- The key style to specify a set of key attributes defined by <key_style/> -->
|
<!-- The key style to specify a set of key attributes defined by <key_style/> -->
|
||||||
<attr name="keyStyle" format="string" />
|
<attr name="keyStyle" format="string" />
|
||||||
|
<!-- Shift key icon for shifted state -->
|
||||||
|
<attr name="shiftedIcon" format="reference" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
<declare-styleable name="BaseKeyboard_Row">
|
<declare-styleable name="BaseKeyboard_Row">
|
||||||
|
|
|
@ -37,6 +37,8 @@
|
||||||
<dimen name="key_text_size">0.13in</dimen>
|
<dimen name="key_text_size">0.13in</dimen>
|
||||||
<dimen name="key_label_text_size">0.083in</dimen>
|
<dimen name="key_label_text_size">0.083in</dimen>
|
||||||
<dimen name="key_preview_text_size_large">40sp</dimen>
|
<dimen name="key_preview_text_size_large">40sp</dimen>
|
||||||
|
<!-- left or right padding for of label alignment -->
|
||||||
|
<dimen name="key_label_horizontal_alignment_padding">0.13in</dimen>
|
||||||
<dimen name="key_preview_offset">0.000in</dimen>
|
<dimen name="key_preview_offset">0.000in</dimen>
|
||||||
<!-- We use "inch", not "dip" because this value tries dealing with physical distance related
|
<!-- We use "inch", not "dip" because this value tries dealing with physical distance related
|
||||||
to user's finger. -->
|
to user's finger. -->
|
||||||
|
|
|
@ -0,0 +1,149 @@
|
||||||
|
<?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"
|
||||||
|
>
|
||||||
|
<!-- Functional key styles -->
|
||||||
|
<switch>
|
||||||
|
<case
|
||||||
|
latin:colorScheme="white"
|
||||||
|
>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="functionalKeyStyle"
|
||||||
|
latin:isModifier="true" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="shiftKeyStyle"
|
||||||
|
latin:codes="@integer/key_shift"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_shift_holo"
|
||||||
|
latin:shiftedIcon="@drawable/sym_keyboard_shift_locked_holo"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
||||||
|
latin:parentStyle="functionalKeyStyle"
|
||||||
|
latin:isSticky="true" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="deleteKeyStyle"
|
||||||
|
latin:codes="@integer/key_delete"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_delete_holo"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_delete"
|
||||||
|
latin:parentStyle="functionalKeyStyle"
|
||||||
|
latin:isRepeatable="true" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="returnKeyStyle"
|
||||||
|
latin:codes="@integer/key_return"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_return_holo"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
|
||||||
|
latin:parentStyle="functionalKeyStyle" />
|
||||||
|
1
|
||||||
|
<key-style
|
||||||
|
latin:styleName="spaceKeyStyle"
|
||||||
|
latin:codes="@integer/key_space"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_space_holo"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
|
||||||
|
latin:parentStyle="functionalKeyStyle" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="nonSpecialBackgroundSpaceKeyStyle"
|
||||||
|
latin:codes="@integer/key_space"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_space_holo"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="smileyKeyStyle"
|
||||||
|
latin:codes="0"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_smiley_holo"
|
||||||
|
latin:keyOutputText=";-) "
|
||||||
|
latin:keyHintIcon="@drawable/hint_popup_holo"
|
||||||
|
latin:popupKeyboard="@xml/popup_smileys" />
|
||||||
|
</case>
|
||||||
|
<case
|
||||||
|
latin:colorScheme="black"
|
||||||
|
>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="functionalKeyStyle" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="shiftKeyStyle"
|
||||||
|
latin:codes="@integer/key_shift"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_shift"
|
||||||
|
latin:shiftedIcon="@drawable/sym_bkeyboard_shift_locked"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
||||||
|
latin:parentStyle="functionalKeyStyle"
|
||||||
|
latin:isSticky="true" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="deleteKeyStyle"
|
||||||
|
latin:codes="@integer/key_delete"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_delete"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_delete"
|
||||||
|
latin:parentStyle="functionalKeyStyle"
|
||||||
|
latin:isRepeatable="true" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="returnKeyStyle"
|
||||||
|
latin:codes="@integer/key_return"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_return"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_return"
|
||||||
|
latin:parentStyle="functionalKeyStyle" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="spaceKeyStyle"
|
||||||
|
latin:codes="@integer/key_space"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_space"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
|
||||||
|
latin:parentStyle="functionalKeyStyle" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="nonSpecialBackgroundSpaceKeyStyle"
|
||||||
|
latin:codes="@integer/key_space"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_space"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="smileyKeyStyle"
|
||||||
|
latin:keyLabel=";-)"
|
||||||
|
latin:keyOutputText=";-) "
|
||||||
|
latin:keyHintIcon="@drawable/hint_popup_holo"
|
||||||
|
latin:popupKeyboard="@xml/popup_smileys" />
|
||||||
|
</case>
|
||||||
|
</switch>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="tabKeyStyle"
|
||||||
|
latin:codes="@integer/key_tab"
|
||||||
|
latin:keyLabel="@string/label_tab_key"
|
||||||
|
latin:keyLabelOption="fontNormal"
|
||||||
|
latin:parentStyle="functionalKeyStyle" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="toSymbolKeyStyle"
|
||||||
|
latin:codes="@integer/key_switch_alpha_symbol"
|
||||||
|
latin:keyLabel="@string/label_to_symbol_key"
|
||||||
|
latin:keyLabelOption="fontNormal"
|
||||||
|
latin:parentStyle="functionalKeyStyle" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="toAlphaKeyStyle"
|
||||||
|
latin:codes="@integer/key_switch_alpha_symbol"
|
||||||
|
latin:keyLabel="@string/label_to_alpha_key"
|
||||||
|
latin:keyLabelOption="fontNormal"
|
||||||
|
latin:parentStyle="functionalKeyStyle" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="moreKeyStyle"
|
||||||
|
latin:codes="@integer/key_shift"
|
||||||
|
latin:keyLabel="@string/label_more_key"
|
||||||
|
latin:keyLabelOption="fontNormal"
|
||||||
|
latin:parentStyle="functionalKeyStyle"
|
||||||
|
latin:isSticky="true" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="comKeyStyle"
|
||||||
|
latin:keyLabel=".com"
|
||||||
|
latin:keyLabelOption="fontNormal"
|
||||||
|
latin:keyHintIcon="@drawable/hint_popup_holo"
|
||||||
|
latin:popupKeyboard="@xml/popup_domains" />
|
||||||
|
</merge>
|
|
@ -25,13 +25,13 @@
|
||||||
latin:verticalGap="@dimen/key_bottom_gap"
|
latin:verticalGap="@dimen/key_bottom_gap"
|
||||||
latin:keyHeight="@dimen/key_height"
|
latin:keyHeight="@dimen/key_height"
|
||||||
>
|
>
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_key_styles" />
|
||||||
<!-- This row is intentionally not marked as a top row -->
|
<!-- This row is intentionally not marked as a top row -->
|
||||||
<Row>
|
<Row>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_tab"
|
latin:keyStyle="tabKeyStyle"
|
||||||
latin:keyLabel="@string/label_tab_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
|
@ -55,12 +55,8 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="9.360%p" />
|
latin:horizontalGap="9.360%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_delete"
|
latin:keyStyle="deleteKeyStyle"
|
||||||
latin:keyLabel="@string/label_backspace_key"
|
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="9.804%p"
|
latin:keyWidth="9.804%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isRepeatable="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -86,11 +82,8 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_return"
|
latin:keyStyle="returnKeyStyle"
|
||||||
latin:keyLabel="@string/label_return_key"
|
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="14.706%p"
|
latin:keyWidth="14.706%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -125,9 +118,7 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="16.406%p" />
|
latin:horizontalGap="16.406%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_space"
|
latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_space"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
|
|
||||||
latin:keyWidth="24.127%p" />
|
latin:keyWidth="24.127%p" />
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
|
|
|
@ -0,0 +1,150 @@
|
||||||
|
<?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"
|
||||||
|
>
|
||||||
|
<switch>
|
||||||
|
<case
|
||||||
|
latin:colorScheme="white"
|
||||||
|
>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num0KeyStyle"
|
||||||
|
latin:codes="48"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num0_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num1KeyStyle"
|
||||||
|
latin:codes="49"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num1_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num2KeyStyle"
|
||||||
|
latin:codes="50"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num2_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num3KeyStyle"
|
||||||
|
latin:codes="51"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num3_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num4KeyStyle"
|
||||||
|
latin:codes="52"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num4_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num5KeyStyle"
|
||||||
|
latin:codes="53"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num5_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num6KeyStyle"
|
||||||
|
latin:codes="54"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num6_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num7KeyStyle"
|
||||||
|
latin:codes="55"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num7_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num8KeyStyle"
|
||||||
|
latin:codes="56"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num8_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num9KeyStyle"
|
||||||
|
latin:codes="57"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num9_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numStarKeyStyle"
|
||||||
|
latin:codes="42"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_numbstar_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numPoundKeyStyle"
|
||||||
|
latin:codes="35"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_numbpound_holo" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numAltKeyStyle"
|
||||||
|
latin:codes="@integer/key_switch_alpha_symbol"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_numalt"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_numalt" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numSpaceKeyStyle"
|
||||||
|
latin:codes="@integer/key_space"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_space_holo"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
||||||
|
</case>
|
||||||
|
<case
|
||||||
|
latin:colorScheme="black"
|
||||||
|
>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num0KeyStyle"
|
||||||
|
latin:codes="48"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num0" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num1KeyStyle"
|
||||||
|
latin:codes="49"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num1" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num2KeyStyle"
|
||||||
|
latin:codes="50"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num2" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num3KeyStyle"
|
||||||
|
latin:codes="51"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num3" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num4KeyStyle"
|
||||||
|
latin:codes="52"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num4" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num5KeyStyle"
|
||||||
|
latin:codes="53"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num5" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num6KeyStyle"
|
||||||
|
latin:codes="54"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num6" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num7KeyStyle"
|
||||||
|
latin:codes="55"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num7" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num8KeyStyle"
|
||||||
|
latin:codes="56"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num8" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num9KeyStyle"
|
||||||
|
latin:codes="57"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num9" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numStarKeyStyle"
|
||||||
|
latin:codes="42"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_numstar" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numPoundKeyStyle"
|
||||||
|
latin:codes="35"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_numpound" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numAltKeyStyle"
|
||||||
|
latin:codes="@integer/key_switch_alpha_symbol"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_numalt"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_numalt" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numSpaceKeyStyle"
|
||||||
|
latin:codes="@integer/key_space"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_space"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
||||||
|
</case>
|
||||||
|
</switch>
|
||||||
|
</merge>
|
|
@ -25,13 +25,15 @@
|
||||||
latin:verticalGap="@dimen/key_bottom_gap"
|
latin:verticalGap="@dimen/key_bottom_gap"
|
||||||
latin:keyHeight="@dimen/key_height"
|
latin:keyHeight="@dimen/key_height"
|
||||||
>
|
>
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_key_styles" />
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_numkey_styles" />
|
||||||
<!-- This row is intentionally not marked as a top row -->
|
<!-- This row is intentionally not marked as a top row -->
|
||||||
<Row>
|
<Row>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_tab"
|
latin:keyStyle="tabKeyStyle"
|
||||||
latin:keyLabel="@string/label_tab_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<!-- To match one character label size with "Tab", I placed spaces around the char '-'
|
<!-- To match one character label size with "Tab", I placed spaces around the char '-'
|
||||||
and '+'. -->
|
and '+'. -->
|
||||||
|
@ -48,32 +50,22 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="8.479%p" />
|
latin:horizontalGap="8.479%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="49"
|
latin:keyStyle="num1KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num1" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="50"
|
latin:keyStyle="num2KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num2" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="51"
|
latin:keyStyle="num3KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num3" />
|
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="9.360%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_delete"
|
latin:keyStyle="deleteKeyStyle"
|
||||||
latin:keyLabel="@string/label_backspace_key"
|
latin:keyWidth="9.804%p"
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="14.706%p"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isRepeatable="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_shift"
|
latin:keyStyle="moreKeyStyle"
|
||||||
latin:keyLabel="@string/label_more_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isSticky="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<!-- To match one character label size with "More", I placed spaces around the char ','
|
<!-- To match one character label size with "More", I placed spaces around the char ','
|
||||||
and '.'. -->
|
and '.'. -->
|
||||||
|
@ -90,22 +82,16 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="8.479%p" />
|
latin:horizontalGap="8.479%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="52"
|
latin:keyStyle="num4KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num4" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="53"
|
latin:keyStyle="num5KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num5" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="54"
|
latin:keyStyle="num6KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num6" />
|
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_return"
|
latin:keyStyle="returnKeyStyle"
|
||||||
latin:keyLabel="@string/label_return_key"
|
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="14.706%p"
|
latin:keyWidth="14.706%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -126,14 +112,11 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="8.479%p" />
|
latin:horizontalGap="8.479%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="55"
|
latin:keyStyle="num7KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num7" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="56"
|
latin:keyStyle="num8KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num8" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="57"
|
latin:keyStyle="num9KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num9" />
|
|
||||||
<!-- There is an empty area bellow the "Enter" key and right of the "9" key. To ignore
|
<!-- There is an empty area bellow the "Enter" key and right of the "9" key. To ignore
|
||||||
the touch event on the area, "9" is intentionally not marked as a right edge key. -->
|
the touch event on the area, "9" is intentionally not marked as a right edge key. -->
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -144,21 +127,16 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="20.427%p" />
|
latin:horizontalGap="20.427%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_space"
|
latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_space"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
|
|
||||||
latin:keyWidth="16.085%p" />
|
latin:keyWidth="16.085%p" />
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="8.479%p" />
|
latin:horizontalGap="8.479%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="42"
|
latin:keyStyle="numStarKeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_numstar" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="48"
|
latin:keyStyle="num0KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num0" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="35"
|
latin:keyStyle="numPoundKeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_numpound" />
|
|
||||||
<!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore
|
<!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore
|
||||||
the touch event on the area, "#" is intentionally not marked as a right edge key. -->
|
the touch event on the area, "#" is intentionally not marked as a right edge key. -->
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -25,13 +25,15 @@
|
||||||
latin:verticalGap="@dimen/key_bottom_gap"
|
latin:verticalGap="@dimen/key_bottom_gap"
|
||||||
latin:keyHeight="@dimen/key_height"
|
latin:keyHeight="@dimen/key_height"
|
||||||
>
|
>
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_key_styles" />
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_numkey_styles" />
|
||||||
<!-- This row is intentionally not marked as a top row -->
|
<!-- This row is intentionally not marked as a top row -->
|
||||||
<Row>
|
<Row>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_tab"
|
latin:keyStyle="tabKeyStyle"
|
||||||
latin:keyLabel="@string/label_tab_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
|
@ -52,32 +54,22 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="49"
|
latin:keyStyle="num1KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num1" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="50"
|
latin:keyStyle="num2KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num2" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="51"
|
latin:keyStyle="num3KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num3" />
|
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="9.360%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_delete"
|
latin:keyStyle="deleteKeyStyle"
|
||||||
latin:keyLabel="@string/label_backspace_key"
|
latin:keyWidth="9.804%p"
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="14.706%p"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isRepeatable="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_shift"
|
latin:keyStyle="moreKeyStyle"
|
||||||
latin:keyLabel="@string/label_more_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isSticky="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
|
@ -98,22 +90,16 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="52"
|
latin:keyStyle="num4KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num4" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="53"
|
latin:keyStyle="num5KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num5" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="54"
|
latin:keyStyle="num6KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num6" />
|
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_return"
|
latin:keyStyle="returnKeyStyle"
|
||||||
latin:keyLabel="@string/label_return_key"
|
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="14.706%p"
|
latin:keyWidth="14.706%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -138,14 +124,11 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="55"
|
latin:keyStyle="num7KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num7" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="56"
|
latin:keyStyle="num8KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num8" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="57"
|
latin:keyStyle="num9KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num9" />
|
|
||||||
<!-- There is an empty area bellow the "Enter" key and right of the "9" key. To ignore
|
<!-- There is an empty area bellow the "Enter" key and right of the "9" key. To ignore
|
||||||
the touch event on the area, "9" is intentionally not marked as a right edge key. -->
|
the touch event on the area, "9" is intentionally not marked as a right edge key. -->
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -156,21 +139,16 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="16.406%p" />
|
latin:horizontalGap="16.406%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_space"
|
latin:keyStyle="nonSpecialBackgroundSpaceKeyStyle"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_space"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
|
|
||||||
latin:keyWidth="24.127%p" />
|
latin:keyWidth="24.127%p" />
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="4.458%p" />
|
latin:horizontalGap="4.458%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="42"
|
latin:keyStyle="numStarKeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_numstar" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="48"
|
latin:keyStyle="num0KeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num0" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:codes="35"
|
latin:keyStyle="numPoundKeyStyle" />
|
||||||
latin:keyIcon="@drawable/sym_keyboard_numpound" />
|
|
||||||
<!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore
|
<!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore
|
||||||
the touch event on the area, "#" is intentionally not marked as a right edge key. -->
|
the touch event on the area, "#" is intentionally not marked as a right edge key. -->
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -24,8 +24,14 @@
|
||||||
latin:verticalGap="@dimen/key_bottom_gap"
|
latin:verticalGap="@dimen/key_bottom_gap"
|
||||||
latin:keyHeight="@dimen/key_height"
|
latin:keyHeight="@dimen/key_height"
|
||||||
>
|
>
|
||||||
<include latin:keyboardLayout="@xml/kbd_qwerty_row1" />
|
<include
|
||||||
<include latin:keyboardLayout="@xml/kbd_qwerty_row2" />
|
latin:keyboardLayout="@xml/kbd_key_styles" />
|
||||||
<include latin:keyboardLayout="@xml/kbd_qwerty_row3" />
|
<include
|
||||||
<include latin:keyboardLayout="@xml/kbd_qwerty_row4" />
|
latin:keyboardLayout="@xml/kbd_qwerty_row1" />
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_qwerty_row2" />
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_qwerty_row3" />
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_qwerty_row4" />
|
||||||
</Keyboard>
|
</Keyboard>
|
||||||
|
|
|
@ -26,11 +26,9 @@
|
||||||
latin:keyWidth="8.272%p"
|
latin:keyWidth="8.272%p"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_tab"
|
latin:keyStyle="tabKeyStyle"
|
||||||
latin:keyLabel="@string/label_tab_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:keyWidth="7.949%p"
|
latin:keyWidth="7.949%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="q"
|
latin:keyLabel="q"
|
||||||
|
@ -73,12 +71,8 @@
|
||||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||||
latin:popupCharacters="@string/alternates_for_p" />
|
latin:popupCharacters="@string/alternates_for_p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_delete"
|
latin:keyStyle="deleteKeyStyle"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_delete"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_delete"
|
|
||||||
latin:keyWidth="9.331%p"
|
latin:keyWidth="9.331%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isRepeatable="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
</merge>
|
</merge>
|
||||||
|
|
|
@ -25,11 +25,9 @@
|
||||||
latin:keyWidth="8.157%p"
|
latin:keyWidth="8.157%p"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_switch_alpha_symbol"
|
latin:keyStyle="toSymbolKeyStyle"
|
||||||
latin:keyLabel="@string/label_to_symbol_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:keyWidth="11.167%p"
|
latin:keyWidth="11.167%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="a"
|
latin:keyLabel="a"
|
||||||
|
@ -60,11 +58,8 @@
|
||||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||||
latin:popupCharacters="@string/alternates_for_l" />
|
latin:popupCharacters="@string/alternates_for_l" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_return"
|
latin:keyStyle="returnKeyStyle"
|
||||||
latin:keyLabel="@string/label_return_key"
|
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="15.750%p"
|
latin:keyWidth="15.750%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
</merge>
|
</merge>
|
||||||
|
|
|
@ -25,12 +25,8 @@
|
||||||
latin:keyWidth="8.042%p"
|
latin:keyWidth="8.042%p"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_shift"
|
latin:keyStyle="shiftKeyStyle"
|
||||||
latin:keyLabel="@string/label_shift_key"
|
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:keyWidth="15.192%p"
|
latin:keyWidth="15.192%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isSticky="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="z"
|
latin:keyLabel="z"
|
||||||
|
@ -81,12 +77,8 @@
|
||||||
</default>
|
</default>
|
||||||
</switch>
|
</switch>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_shift"
|
latin:keyStyle="shiftKeyStyle"
|
||||||
latin:keyLabel="@string/label_shift_key"
|
latin:keyWidth="12.530%p"
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="12.430%p"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isSticky="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
</merge>
|
</merge>
|
||||||
|
|
|
@ -32,10 +32,7 @@
|
||||||
latin:mode="email"
|
latin:mode="email"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel=".com"
|
latin:keyStyle="comKeyStyle" />
|
||||||
latin:keyOutputText=".com"
|
|
||||||
latin:keyHintIcon="@drawable/hint_popup"
|
|
||||||
latin:popupKeyboard="@xml/popup_domains" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="\@" />
|
latin:keyLabel="\@" />
|
||||||
</case>
|
</case>
|
||||||
|
@ -44,18 +41,12 @@
|
||||||
latin:mode="url"
|
latin:mode="url"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel=".com"
|
latin:keyStyle="comKeyStyle"
|
||||||
latin:keyOutputText=".com"
|
|
||||||
latin:keyHintIcon="@drawable/hint_popup"
|
|
||||||
latin:popupKeyboard="@xml/popup_domains"
|
|
||||||
latin:keyWidth="16.084%p" />
|
latin:keyWidth="16.084%p" />
|
||||||
</case>
|
</case>
|
||||||
<default>
|
<default>
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel=":-)"
|
latin:keyStyle="smileyKeyStyle" />
|
||||||
latin:keyOutputText=":-)"
|
|
||||||
latin:keyHintIcon="@drawable/hint_popup"
|
|
||||||
latin:popupKeyboard="@xml/popup_smileys" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="/"
|
latin:keyLabel="/"
|
||||||
latin:manualTemporaryUpperCaseCode="64"
|
latin:manualTemporaryUpperCaseCode="64"
|
||||||
|
@ -66,11 +57,8 @@
|
||||||
</default>
|
</default>
|
||||||
</switch>
|
</switch>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_space"
|
latin:keyStyle="spaceKeyStyle"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_space"
|
latin:keyWidth="37.454%p" />
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
|
|
||||||
latin:keyWidth="37.454%p"
|
|
||||||
latin:isModifier="true" />
|
|
||||||
<switch>
|
<switch>
|
||||||
<case
|
<case
|
||||||
latin:mode="email"
|
latin:mode="email"
|
||||||
|
|
|
@ -24,16 +24,16 @@
|
||||||
latin:verticalGap="@dimen/key_bottom_gap"
|
latin:verticalGap="@dimen/key_bottom_gap"
|
||||||
latin:keyHeight="@dimen/key_height"
|
latin:keyHeight="@dimen/key_height"
|
||||||
>
|
>
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_key_styles" />
|
||||||
<!-- This row is intentionally not marked as a top row -->
|
<!-- This row is intentionally not marked as a top row -->
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.272%p"
|
latin:keyWidth="8.272%p"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_tab"
|
latin:keyStyle="tabKeyStyle"
|
||||||
latin:keyLabel="@string/label_tab_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:keyWidth="7.949%p"
|
latin:keyWidth="7.949%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="1"
|
latin:keyLabel="1"
|
||||||
|
@ -70,23 +70,17 @@
|
||||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||||
latin:popupCharacters="ⁿ∅" />
|
latin:popupCharacters="ⁿ∅" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_delete"
|
latin:keyStyle="deleteKeyStyle"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_delete"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_delete"
|
|
||||||
latin:keyWidth="9.331%p"
|
latin:keyWidth="9.331%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isRepeatable="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.157%p"
|
latin:keyWidth="8.157%p"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_switch_alpha_symbol"
|
latin:keyStyle="toAlphaKeyStyle"
|
||||||
latin:keyLabel="@string/label_to_alpha_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:keyWidth="11.167%p"
|
latin:keyWidth="11.167%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="#" />
|
latin:keyLabel="#" />
|
||||||
|
@ -121,23 +115,17 @@
|
||||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||||
latin:popupCharacters="]}>" />
|
latin:popupCharacters="]}>" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_return"
|
latin:keyStyle="returnKeyStyle"
|
||||||
latin:keyLabel="@string/label_return_key"
|
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="15.750%p"
|
latin:keyWidth="15.750%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.042%p"
|
latin:keyWidth="8.042%p"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_shift"
|
latin:keyStyle="moreKeyStyle"
|
||||||
latin:keyLabel="@string/label_more_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:keyWidth="15.192%p"
|
latin:keyWidth="15.192%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isSticky="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="<"
|
latin:keyLabel="<"
|
||||||
|
@ -166,13 +154,9 @@
|
||||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||||
latin:popupCharacters="¿" />
|
latin:popupCharacters="¿" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_shift"
|
latin:keyStyle="moreKeyStyle"
|
||||||
latin:keyLabel="@string/label_more_key"
|
latin:keyLabelOption="alignRight"
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
latin:keyWidth="12.530%p"
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
|
||||||
latin:keyWidth="12.430%p"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isSticky="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<!-- This row is intentionally not marked as a bottom row -->
|
<!-- This row is intentionally not marked as a bottom row -->
|
||||||
|
@ -186,11 +170,8 @@
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="\@" />
|
latin:keyLabel="\@" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_space"
|
latin:keyStyle="spaceKeyStyle"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_space"
|
latin:keyWidth="37.454%p" />
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
|
|
||||||
latin:keyWidth="37.454%p"
|
|
||||||
latin:isModifier="true" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="""
|
latin:keyLabel="""
|
||||||
latin:popupKeyboard="@xml/kbd_popup_template"
|
latin:popupKeyboard="@xml/kbd_popup_template"
|
||||||
|
|
|
@ -24,16 +24,16 @@
|
||||||
latin:verticalGap="@dimen/key_bottom_gap"
|
latin:verticalGap="@dimen/key_bottom_gap"
|
||||||
latin:keyHeight="@dimen/key_height"
|
latin:keyHeight="@dimen/key_height"
|
||||||
>
|
>
|
||||||
|
<include
|
||||||
|
latin:keyboardLayout="@xml/kbd_key_styles" />
|
||||||
<!-- This row is intentionally not marked as a top row -->
|
<!-- This row is intentionally not marked as a top row -->
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.272%p"
|
latin:keyWidth="8.272%p"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_tab"
|
latin:keyStyle="tabKeyStyle"
|
||||||
latin:keyLabel="@string/label_tab_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:keyWidth="7.949%p"
|
latin:keyWidth="7.949%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="~" />
|
latin:keyLabel="~" />
|
||||||
|
@ -60,23 +60,17 @@
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="}" />
|
latin:keyLabel="}" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_delete"
|
latin:keyStyle="deleteKeyStyle"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_delete"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_delete"
|
|
||||||
latin:keyWidth="9.331%p"
|
latin:keyWidth="9.331%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isRepeatable="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.157%p"
|
latin:keyWidth="8.157%p"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_switch_alpha_symbol"
|
latin:keyStyle="toAlphaKeyStyle"
|
||||||
latin:keyLabel="@string/label_to_alpha_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:keyWidth="11.167%p"
|
latin:keyWidth="11.167%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="£" />
|
latin:keyLabel="£" />
|
||||||
|
@ -101,23 +95,17 @@
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="]" />
|
latin:keyLabel="]" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_return"
|
latin:keyStyle="returnKeyStyle"
|
||||||
latin:keyLabel="@string/label_return_key"
|
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
|
||||||
latin:keyWidth="15.750%p"
|
latin:keyWidth="15.750%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.042%p"
|
latin:keyWidth="8.042%p"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_shift"
|
latin:keyStyle="moreKeyStyle"
|
||||||
latin:keyLabel="@string/label_more_key"
|
latin:keyLabelOption="alignLeft"
|
||||||
latin:keyLabelOption="fontNormal|alignLeft|alignBottom"
|
|
||||||
latin:keyWidth="15.192%p"
|
latin:keyWidth="15.192%p"
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isSticky="true"
|
|
||||||
latin:keyEdgeFlags="left" />
|
latin:keyEdgeFlags="left" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="©" />
|
latin:keyLabel="©" />
|
||||||
|
@ -142,12 +130,9 @@
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="¿" />
|
latin:keyLabel="¿" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_shift"
|
latin:keyStyle="moreKeyStyle"
|
||||||
latin:keyLabel="@string/label_more_key"
|
latin:keyLabelOption="alignRight"
|
||||||
latin:keyLabelOption="fontNormal|alignRight|alignBottom"
|
latin:keyWidth="12.530%p"
|
||||||
latin:keyWidth="12.430%p"
|
|
||||||
latin:isModifier="true"
|
|
||||||
latin:isSticky="true"
|
|
||||||
latin:keyEdgeFlags="right" />
|
latin:keyEdgeFlags="right" />
|
||||||
</Row>
|
</Row>
|
||||||
<!-- This row is intentionally not marked as a bottom row -->
|
<!-- This row is intentionally not marked as a bottom row -->
|
||||||
|
@ -157,10 +142,7 @@
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:horizontalGap="32.488%p" />
|
latin:horizontalGap="32.488%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:codes="@integer/key_space"
|
latin:keyStyle="spaceKeyStyle"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_space"
|
latin:keyWidth="37.454%p" />
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space"
|
|
||||||
latin:keyWidth="37.454%p"
|
|
||||||
latin:isModifier="true" />
|
|
||||||
</Row>
|
</Row>
|
||||||
</Keyboard>
|
</Keyboard>
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
latin:styleName="shiftKeyStyle"
|
latin:styleName="shiftKeyStyle"
|
||||||
latin:codes="@integer/key_shift"
|
latin:codes="@integer/key_shift"
|
||||||
latin:keyIcon="@drawable/sym_keyboard_shift"
|
latin:keyIcon="@drawable/sym_keyboard_shift"
|
||||||
|
latin:shiftedIcon="@drawable/sym_keyboard_shift_locked"
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
||||||
latin:parentStyle="functionalKeyStyle"
|
latin:parentStyle="functionalKeyStyle"
|
||||||
latin:isSticky="true" />
|
latin:isSticky="true" />
|
||||||
|
@ -109,6 +110,7 @@
|
||||||
latin:styleName="shiftKeyStyle"
|
latin:styleName="shiftKeyStyle"
|
||||||
latin:codes="@integer/key_shift"
|
latin:codes="@integer/key_shift"
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_shift"
|
latin:keyIcon="@drawable/sym_bkeyboard_shift"
|
||||||
|
latin:shiftedIcon="@drawable/sym_bkeyboard_shift_locked"
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
latin:iconPreview="@drawable/sym_keyboard_feedback_shift"
|
||||||
latin:parentStyle="functionalKeyStyle"
|
latin:parentStyle="functionalKeyStyle"
|
||||||
latin:isSticky="true" />
|
latin:isSticky="true" />
|
||||||
|
|
|
@ -0,0 +1,150 @@
|
||||||
|
<?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"
|
||||||
|
>
|
||||||
|
<switch>
|
||||||
|
<case
|
||||||
|
latin:colorScheme="white"
|
||||||
|
>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num0KeyStyle"
|
||||||
|
latin:codes="48"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num0" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num1KeyStyle"
|
||||||
|
latin:codes="49"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num1" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num2KeyStyle"
|
||||||
|
latin:codes="50"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num2" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num3KeyStyle"
|
||||||
|
latin:codes="51"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num3" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num4KeyStyle"
|
||||||
|
latin:codes="52"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num4" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num5KeyStyle"
|
||||||
|
latin:codes="53"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num5" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num6KeyStyle"
|
||||||
|
latin:codes="54"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num6" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num7KeyStyle"
|
||||||
|
latin:codes="55"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num7" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num8KeyStyle"
|
||||||
|
latin:codes="56"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num8" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num9KeyStyle"
|
||||||
|
latin:codes="57"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_num9" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numStarKeyStyle"
|
||||||
|
latin:codes="42"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_numstar" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numPoundKeyStyle"
|
||||||
|
latin:codes="35"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_numpound" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numAltKeyStyle"
|
||||||
|
latin:codes="@integer/key_switch_alpha_symbol"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_numalt"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_numalt" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numSpaceKeyStyle"
|
||||||
|
latin:codes="@integer/key_space"
|
||||||
|
latin:keyIcon="@drawable/sym_keyboard_space"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
||||||
|
</case>
|
||||||
|
<case
|
||||||
|
latin:colorScheme="black"
|
||||||
|
>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num0KeyStyle"
|
||||||
|
latin:codes="48"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num0" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num1KeyStyle"
|
||||||
|
latin:codes="49"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num1" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num2KeyStyle"
|
||||||
|
latin:codes="50"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num2" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num3KeyStyle"
|
||||||
|
latin:codes="51"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num3" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num4KeyStyle"
|
||||||
|
latin:codes="52"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num4" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num5KeyStyle"
|
||||||
|
latin:codes="53"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num5" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num6KeyStyle"
|
||||||
|
latin:codes="54"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num6" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num7KeyStyle"
|
||||||
|
latin:codes="55"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num7" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num8KeyStyle"
|
||||||
|
latin:codes="56"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num8" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="num9KeyStyle"
|
||||||
|
latin:codes="57"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_num9" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numStarKeyStyle"
|
||||||
|
latin:codes="42"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_numstar" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numPoundKeyStyle"
|
||||||
|
latin:codes="35"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_numpound" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numAltKeyStyle"
|
||||||
|
latin:codes="@integer/key_switch_alpha_symbol"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_numalt"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_numalt" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="numSpaceKeyStyle"
|
||||||
|
latin:codes="@integer/key_space"
|
||||||
|
latin:keyIcon="@drawable/sym_bkeyboard_space"
|
||||||
|
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
||||||
|
</case>
|
||||||
|
</switch>
|
||||||
|
</merge>
|
|
@ -27,116 +27,8 @@
|
||||||
>
|
>
|
||||||
<include
|
<include
|
||||||
latin:keyboardLayout="@xml/kbd_key_styles" />
|
latin:keyboardLayout="@xml/kbd_key_styles" />
|
||||||
<switch>
|
<include
|
||||||
<case
|
latin:keyboardLayout="@xml/kbd_numkey_styles" />
|
||||||
latin:colorScheme="white"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num0KeyStyle"
|
|
||||||
latin:codes="48"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num0" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num1KeyStyle"
|
|
||||||
latin:codes="49"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num1" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num2KeyStyle"
|
|
||||||
latin:codes="50"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num2" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num3KeyStyle"
|
|
||||||
latin:codes="51"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num3" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num4KeyStyle"
|
|
||||||
latin:codes="52"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num4" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num5KeyStyle"
|
|
||||||
latin:codes="53"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num5" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num6KeyStyle"
|
|
||||||
latin:codes="54"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num6" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num7KeyStyle"
|
|
||||||
latin:codes="55"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num7" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num8KeyStyle"
|
|
||||||
latin:codes="56"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num8" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num9KeyStyle"
|
|
||||||
latin:codes="57"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_num9" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numAltKeyStyle"
|
|
||||||
latin:codes="@integer/key_switch_alpha_symbol"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_numalt"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_numalt" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numSpaceKeyStyle"
|
|
||||||
latin:codes="@integer/key_space"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_space"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:colorScheme="black"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num0KeyStyle"
|
|
||||||
latin:codes="48"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num0" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num1KeyStyle"
|
|
||||||
latin:codes="49"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num1" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num2KeyStyle"
|
|
||||||
latin:codes="50"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num2" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num3KeyStyle"
|
|
||||||
latin:codes="51"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num3" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num4KeyStyle"
|
|
||||||
latin:codes="52"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num4" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num5KeyStyle"
|
|
||||||
latin:codes="53"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num5" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num6KeyStyle"
|
|
||||||
latin:codes="54"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num6" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num7KeyStyle"
|
|
||||||
latin:codes="55"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num7" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num8KeyStyle"
|
|
||||||
latin:codes="56"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num8" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="num9KeyStyle"
|
|
||||||
latin:codes="57"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_num9" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numAltKeyStyle"
|
|
||||||
latin:codes="@integer/key_switch_alpha_symbol"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_numalt"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_numalt" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numSpaceKeyStyle"
|
|
||||||
latin:codes="@integer/key_space"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_space"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
|
||||||
</case>
|
|
||||||
</switch>
|
|
||||||
<Row
|
<Row
|
||||||
latin:rowEdgeFlags="top"
|
latin:rowEdgeFlags="top"
|
||||||
>
|
>
|
||||||
|
|
|
@ -27,44 +27,8 @@
|
||||||
>
|
>
|
||||||
<include
|
<include
|
||||||
latin:keyboardLayout="@xml/kbd_key_styles" />
|
latin:keyboardLayout="@xml/kbd_key_styles" />
|
||||||
<switch>
|
<include
|
||||||
<case
|
latin:keyboardLayout="@xml/kbd_numkey_styles" />
|
||||||
latin:colorScheme="white"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numStarKeyStyle"
|
|
||||||
latin:codes="42"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_numstar"
|
|
||||||
latin:keyEdgeFlags="left" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numPoundKeyStyle"
|
|
||||||
latin:codes="35"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_numpound" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numSpaceKeyStyle"
|
|
||||||
latin:codes="@integer/key_space"
|
|
||||||
latin:keyIcon="@drawable/sym_keyboard_space"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:colorScheme="black"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numStarKeyStyle"
|
|
||||||
latin:codes="42"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_numstar"
|
|
||||||
latin:keyEdgeFlags="left" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numPoundKeyStyle"
|
|
||||||
latin:codes="35"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_numpound" />
|
|
||||||
<key-style
|
|
||||||
latin:styleName="numSpaceKeyStyle"
|
|
||||||
latin:codes="@integer/key_space"
|
|
||||||
latin:keyIcon="@drawable/sym_bkeyboard_space"
|
|
||||||
latin:iconPreview="@drawable/sym_keyboard_feedback_space" />
|
|
||||||
</case>
|
|
||||||
</switch>
|
|
||||||
<Row
|
<Row
|
||||||
latin:rowEdgeFlags="top"
|
latin:rowEdgeFlags="top"
|
||||||
>
|
>
|
||||||
|
|
|
@ -28,11 +28,14 @@ import android.content.res.TypedArray;
|
||||||
import android.content.res.XmlResourceParser;
|
import android.content.res.XmlResourceParser;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
import android.util.Xml;
|
import android.util.Xml;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads an XML description of a keyboard and stores the attributes of the keys. A keyboard
|
* Loads an XML description of a keyboard and stores the attributes of the keys. A keyboard
|
||||||
|
@ -86,6 +89,9 @@ public class BaseKeyboard {
|
||||||
/** List of shift keys in this keyboard */
|
/** List of shift keys in this keyboard */
|
||||||
private final List<Key> mShiftKeys = new ArrayList<Key>();
|
private final List<Key> mShiftKeys = new ArrayList<Key>();
|
||||||
|
|
||||||
|
/** List of shift keys and its shifted state icon */
|
||||||
|
private final HashMap<Key, Drawable> mShiftedIcons = new HashMap<Key, Drawable>();
|
||||||
|
|
||||||
/** Total height of the keyboard, including the padding and keys */
|
/** Total height of the keyboard, including the padding and keys */
|
||||||
private int mTotalHeight;
|
private int mTotalHeight;
|
||||||
|
|
||||||
|
@ -340,6 +346,10 @@ public class BaseKeyboard {
|
||||||
manualTemporaryUpperCaseCode = style.getInt(a,
|
manualTemporaryUpperCaseCode = style.getInt(a,
|
||||||
R.styleable.BaseKeyboard_Key_manualTemporaryUpperCaseCode, 0);
|
R.styleable.BaseKeyboard_Key_manualTemporaryUpperCaseCode, 0);
|
||||||
text = style.getText(a, R.styleable.BaseKeyboard_Key_keyOutputText);
|
text = style.getText(a, R.styleable.BaseKeyboard_Key_keyOutputText);
|
||||||
|
final Drawable shiftedIcon = style.getDrawable(a,
|
||||||
|
R.styleable.BaseKeyboard_Key_shiftedIcon);
|
||||||
|
if (shiftedIcon != null)
|
||||||
|
keyboard.getShiftedIcons().put(this, shiftedIcon);
|
||||||
|
|
||||||
if (codes == null && !TextUtils.isEmpty(label)) {
|
if (codes == null && !TextUtils.isEmpty(label)) {
|
||||||
codes = new int[] { label.charAt(0) };
|
codes = new int[] { label.charAt(0) };
|
||||||
|
@ -622,6 +632,10 @@ public class BaseKeyboard {
|
||||||
return mShiftKeys;
|
return mShiftKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<Key, Drawable> getShiftedIcons() {
|
||||||
|
return mShiftedIcons;
|
||||||
|
}
|
||||||
|
|
||||||
private void computeNearestNeighbors() {
|
private void computeNearestNeighbors() {
|
||||||
// Round-up so we don't have any pixels outside the grid
|
// Round-up so we don't have any pixels outside the grid
|
||||||
mCellWidth = (getMinWidth() + GRID_WIDTH - 1) / GRID_WIDTH;
|
mCellWidth = (getMinWidth() + GRID_WIDTH - 1) / GRID_WIDTH;
|
||||||
|
@ -686,8 +700,10 @@ public class BaseKeyboard {
|
||||||
mTotalWidth = parser.getMaxRowWidth();
|
mTotalWidth = parser.getMaxRowWidth();
|
||||||
mTotalHeight = parser.getTotalHeight();
|
mTotalHeight = parser.getTotalHeight();
|
||||||
} catch (XmlPullParserException e) {
|
} catch (XmlPullParserException e) {
|
||||||
|
Log.w(TAG, "keyboard XML parse error: " + e);
|
||||||
throw new IllegalArgumentException(e);
|
throw new IllegalArgumentException(e);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Log.w(TAG, "keyboard XML parse error: " + e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,6 +174,7 @@ public class BaseKeyboardParser {
|
||||||
keyboard.setVerticalGap(getDimensionOrFraction(a,
|
keyboard.setVerticalGap(getDimensionOrFraction(a,
|
||||||
R.styleable.BaseKeyboard_verticalGap, height, 0));
|
R.styleable.BaseKeyboard_verticalGap, height, 0));
|
||||||
a.recycle();
|
a.recycle();
|
||||||
|
if (DEBUG_TAG) Log.d(TAG, "id=" + keyboard.mId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void parseKeyboardContent(XmlResourceParser parser, List<Key> keys)
|
private void parseKeyboardContent(XmlResourceParser parser, List<Key> keys)
|
||||||
|
@ -310,6 +311,7 @@ public class BaseKeyboardParser {
|
||||||
checkEndTag(TAG_INCLUDE, parser);
|
checkEndTag(TAG_INCLUDE, parser);
|
||||||
if (keyboardLayout == 0)
|
if (keyboardLayout == 0)
|
||||||
throw new ParseException("No keyboardLayout attribute in <include/>", parser);
|
throw new ParseException("No keyboardLayout attribute in <include/>", parser);
|
||||||
|
if (DEBUG_TAG) Log.d(TAG, String.format(" keyboardLayout=0x%08x", keyboardLayout));
|
||||||
parseMerge(mResources.getLayout(keyboardLayout), row, keys);
|
parseMerge(mResources.getLayout(keyboardLayout), row, keys);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -560,10 +562,10 @@ public class BaseKeyboardParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String debugInteger(TypedArray a, int index, String name) {
|
private static String debugInteger(TypedArray a, int index, String name) {
|
||||||
return a.hasValue(index) ? name + "=" + a.getInt(index, 0) : "";
|
return a.hasValue(index) ? " " + name + "=" + a.getInt(index, 0) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String debugBoolean(TypedArray a, int index, String name) {
|
private static String debugBoolean(TypedArray a, int index, String name) {
|
||||||
return a.hasValue(index) ? name + "=" + a.getBoolean(index, false) : "";
|
return a.hasValue(index) ? " " + name + "=" + a.getBoolean(index, false) : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,7 @@ import java.util.WeakHashMap;
|
||||||
public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
|
public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
private static final String TAG = "BaseKeyboardView";
|
private static final String TAG = "BaseKeyboardView";
|
||||||
private static final boolean DEBUG = false;
|
private static final boolean DEBUG = false;
|
||||||
|
private static final boolean DEBUG_SHOW_ALIGN = false;
|
||||||
private static final boolean DEBUG_KEYBOARD_GRID = false;
|
private static final boolean DEBUG_KEYBOARD_GRID = false;
|
||||||
|
|
||||||
public static final int COLOR_SCHEME_WHITE = 0;
|
public static final int COLOR_SCHEME_WHITE = 0;
|
||||||
|
@ -252,17 +253,15 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
private final Rect mClipRegion = new Rect(0, 0, 0, 0);
|
private final Rect mClipRegion = new Rect(0, 0, 0, 0);
|
||||||
// This map caches key label text height in pixel as value and key label text size as map key.
|
// This map caches key label text height in pixel as value and key label text size as map key.
|
||||||
private final HashMap<Integer, Integer> mTextHeightCache = new HashMap<Integer, Integer>();
|
private final HashMap<Integer, Integer> mTextHeightCache = new HashMap<Integer, Integer>();
|
||||||
// This map caches key label text width in pixel as value and key label text size as map key.
|
|
||||||
private final HashMap<Integer, Integer> mTextWidthCache = new HashMap<Integer, Integer>();
|
|
||||||
// Distance from horizontal center of the key, proportional to key label text height and width.
|
// Distance from horizontal center of the key, proportional to key label text height and width.
|
||||||
private final float KEY_LABEL_VERTICAL_ADJUSTMENT_FACTOR_CENTER = 0.55f;
|
private final float KEY_LABEL_VERTICAL_ADJUSTMENT_FACTOR_CENTER = 0.55f;
|
||||||
private final float KEY_LABEL_VERTICAL_PADDING_FACTOR = 1.60f;
|
private final float KEY_LABEL_VERTICAL_PADDING_FACTOR = 1.60f;
|
||||||
private final float KEY_LABEL_HORIZONTAL_PADDING_FACTOR = 0.80f;
|
|
||||||
private final String KEY_LABEL_REFERENCE_CHAR = "H";
|
private final String KEY_LABEL_REFERENCE_CHAR = "H";
|
||||||
private final int KEY_LABEL_OPTION_ALIGN_LEFT = 1;
|
private final int KEY_LABEL_OPTION_ALIGN_LEFT = 1;
|
||||||
private final int KEY_LABEL_OPTION_ALIGN_RIGHT = 2;
|
private final int KEY_LABEL_OPTION_ALIGN_RIGHT = 2;
|
||||||
private final int KEY_LABEL_OPTION_ALIGN_BOTTOM = 8;
|
private final int KEY_LABEL_OPTION_ALIGN_BOTTOM = 8;
|
||||||
private final int KEY_LABEL_OPTION_FONT_NORMAL = 16;
|
private final int KEY_LABEL_OPTION_FONT_NORMAL = 16;
|
||||||
|
private final int mKeyLabelHorizontalPadding;
|
||||||
|
|
||||||
private final UIHandler mHandler = new UIHandler();
|
private final UIHandler mHandler = new UIHandler();
|
||||||
|
|
||||||
|
@ -514,6 +513,8 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
mPreviewPopup.setAnimationStyle(R.style.KeyPreviewAnimation);
|
mPreviewPopup.setAnimationStyle(R.style.KeyPreviewAnimation);
|
||||||
mDelayBeforePreview = res.getInteger(R.integer.config_delay_before_preview);
|
mDelayBeforePreview = res.getInteger(R.integer.config_delay_before_preview);
|
||||||
mDelayAfterPreview = res.getInteger(R.integer.config_delay_after_preview);
|
mDelayAfterPreview = res.getInteger(R.integer.config_delay_after_preview);
|
||||||
|
mKeyLabelHorizontalPadding = (int)res.getDimension(
|
||||||
|
R.dimen.key_label_horizontal_alignment_padding);
|
||||||
|
|
||||||
mMiniKeyboardParent = this;
|
mMiniKeyboardParent = this;
|
||||||
mMiniKeyboardPopup = new PopupWindow(context);
|
mMiniKeyboardPopup = new PopupWindow(context);
|
||||||
|
@ -818,44 +819,22 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
canvas.translate(key.x + kbdPaddingLeft, key.y + kbdPaddingTop);
|
canvas.translate(key.x + kbdPaddingLeft, key.y + kbdPaddingTop);
|
||||||
keyBackground.draw(canvas);
|
keyBackground.draw(canvas);
|
||||||
|
|
||||||
|
final int rowHeight = padding.top + key.height;
|
||||||
boolean drawHintIcon = true;
|
boolean drawHintIcon = true;
|
||||||
// Draw key label
|
// Draw key label
|
||||||
if (label != null) {
|
if (label != null) {
|
||||||
// For characters, use large font. For labels like "Done", use small font.
|
// For characters, use large font. For labels like "Done", use small font.
|
||||||
final int labelSize;
|
final int labelSize = getLabelSizeAndSetPaint(label, key, paint);
|
||||||
if (label.length() > 1 && key.codes.length < 2) {
|
final int labelCharHeight = getLabelCharHeight(labelSize, paint);
|
||||||
labelSize = mLabelTextSize;
|
|
||||||
if ((key.labelOption & KEY_LABEL_OPTION_FONT_NORMAL) != 0) {
|
|
||||||
paint.setTypeface(Typeface.DEFAULT);
|
|
||||||
} else {
|
|
||||||
paint.setTypeface(Typeface.DEFAULT_BOLD);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
labelSize = mKeyTextSize;
|
|
||||||
paint.setTypeface(mKeyTextStyle);
|
|
||||||
}
|
|
||||||
paint.setTextSize(labelSize);
|
|
||||||
|
|
||||||
Integer labelHeightValue = mTextHeightCache.get(labelSize);
|
|
||||||
final int labelCharHeight;
|
|
||||||
final int labelCharWidth;
|
|
||||||
if (labelHeightValue != null) {
|
|
||||||
labelCharHeight = labelHeightValue;
|
|
||||||
labelCharWidth = mTextWidthCache.get(labelSize);
|
|
||||||
} else {
|
|
||||||
Rect textBounds = new Rect();
|
|
||||||
paint.getTextBounds(KEY_LABEL_REFERENCE_CHAR, 0, 1, textBounds);
|
|
||||||
labelCharHeight = textBounds.height();
|
|
||||||
labelCharWidth = textBounds.width();
|
|
||||||
mTextHeightCache.put(labelSize, labelCharHeight);
|
|
||||||
mTextWidthCache.put(labelSize, labelCharWidth);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Vertical label text alignment.
|
// Vertical label text alignment.
|
||||||
final float baseline;
|
final float baseline;
|
||||||
if ((key.labelOption & KEY_LABEL_OPTION_ALIGN_BOTTOM) != 0) {
|
if ((key.labelOption & KEY_LABEL_OPTION_ALIGN_BOTTOM) != 0) {
|
||||||
baseline = key.height -
|
baseline = key.height -
|
||||||
+ labelCharHeight * KEY_LABEL_VERTICAL_PADDING_FACTOR;
|
+ labelCharHeight * KEY_LABEL_VERTICAL_PADDING_FACTOR;
|
||||||
|
if (DEBUG_SHOW_ALIGN)
|
||||||
|
drawHorizontalLine(canvas, (int)baseline, key.width, 0xc0008000,
|
||||||
|
new Paint());
|
||||||
} else { // Align center
|
} else { // Align center
|
||||||
final float centerY = (key.height + padding.top - padding.bottom) / 2;
|
final float centerY = (key.height + padding.top - padding.bottom) / 2;
|
||||||
baseline = centerY
|
baseline = centerY
|
||||||
|
@ -864,16 +843,20 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
// Horizontal label text alignment
|
// Horizontal label text alignment
|
||||||
final int positionX;
|
final int positionX;
|
||||||
if ((key.labelOption & KEY_LABEL_OPTION_ALIGN_LEFT) != 0) {
|
if ((key.labelOption & KEY_LABEL_OPTION_ALIGN_LEFT) != 0) {
|
||||||
positionX = (int)(
|
positionX = mKeyLabelHorizontalPadding + padding.left;
|
||||||
labelCharWidth * KEY_LABEL_HORIZONTAL_PADDING_FACTOR + padding.left);
|
|
||||||
paint.setTextAlign(Align.LEFT);
|
paint.setTextAlign(Align.LEFT);
|
||||||
|
if (DEBUG_SHOW_ALIGN)
|
||||||
|
drawVerticalLine(canvas, positionX, rowHeight, 0xc0800080, new Paint());
|
||||||
} else if ((key.labelOption & KEY_LABEL_OPTION_ALIGN_RIGHT) != 0) {
|
} else if ((key.labelOption & KEY_LABEL_OPTION_ALIGN_RIGHT) != 0) {
|
||||||
positionX = (int)(key.width
|
positionX = key.width - mKeyLabelHorizontalPadding - padding.right;
|
||||||
- labelCharWidth * KEY_LABEL_HORIZONTAL_PADDING_FACTOR - padding.right);
|
|
||||||
paint.setTextAlign(Align.RIGHT);
|
paint.setTextAlign(Align.RIGHT);
|
||||||
|
if (DEBUG_SHOW_ALIGN)
|
||||||
|
drawVerticalLine(canvas, positionX, rowHeight, 0xc0808000, new Paint());
|
||||||
} else {
|
} else {
|
||||||
positionX = (key.width + padding.left - padding.right) / 2;
|
positionX = (key.width + padding.left - padding.right) / 2;
|
||||||
paint.setTextAlign(Align.CENTER);
|
paint.setTextAlign(Align.CENTER);
|
||||||
|
if (DEBUG_SHOW_ALIGN && label.length() > 1)
|
||||||
|
drawVerticalLine(canvas, positionX, rowHeight, 0xc0008080, new Paint());
|
||||||
}
|
}
|
||||||
// Set a drop shadow for the text
|
// Set a drop shadow for the text
|
||||||
paint.setShadowLayer(mShadowRadius, 0, 0, mShadowColor);
|
paint.setShadowLayer(mShadowRadius, 0, 0, mShadowColor);
|
||||||
|
@ -883,21 +866,44 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
}
|
}
|
||||||
// Draw key icon
|
// Draw key icon
|
||||||
if (key.label == null && key.icon != null) {
|
if (key.label == null && key.icon != null) {
|
||||||
int drawableWidth = key.icon.getIntrinsicWidth();
|
final int drawableWidth = key.icon.getIntrinsicWidth();
|
||||||
int drawableHeight = key.icon.getIntrinsicHeight();
|
final int drawableHeight = key.icon.getIntrinsicHeight();
|
||||||
int drawableX = (key.width + padding.left - padding.right - drawableWidth) / 2;
|
final int drawableX;
|
||||||
int drawableY = (key.height + padding.top - padding.bottom - drawableHeight) / 2;
|
final int drawableY = (
|
||||||
|
key.height + padding.top - padding.bottom - drawableHeight) / 2;
|
||||||
|
if ((key.labelOption & KEY_LABEL_OPTION_ALIGN_LEFT) != 0) {
|
||||||
|
drawableX = padding.left + mKeyLabelHorizontalPadding;
|
||||||
|
if (DEBUG_SHOW_ALIGN)
|
||||||
|
drawVerticalLine(canvas, drawableX, rowHeight, 0xc0800080, new Paint());
|
||||||
|
} else if ((key.labelOption & KEY_LABEL_OPTION_ALIGN_RIGHT) != 0) {
|
||||||
|
drawableX = key.width - padding.right - mKeyLabelHorizontalPadding
|
||||||
|
- drawableWidth;
|
||||||
|
if (DEBUG_SHOW_ALIGN)
|
||||||
|
drawVerticalLine(canvas, drawableX + drawableWidth, rowHeight,
|
||||||
|
0xc0808000, new Paint());
|
||||||
|
} else { // Align center
|
||||||
|
drawableX = (key.width + padding.left - padding.right - drawableWidth) / 2;
|
||||||
|
if (DEBUG_SHOW_ALIGN)
|
||||||
|
drawVerticalLine(canvas, drawableX + drawableWidth / 2, rowHeight,
|
||||||
|
0xc0008080, new Paint());
|
||||||
|
}
|
||||||
drawIcon(canvas, key.icon, drawableX, drawableY, drawableWidth, drawableHeight);
|
drawIcon(canvas, key.icon, drawableX, drawableY, drawableWidth, drawableHeight);
|
||||||
|
if (DEBUG_SHOW_ALIGN)
|
||||||
|
drawRectangle(canvas, drawableX, drawableY, drawableWidth, drawableHeight,
|
||||||
|
0x80c00000, new Paint());
|
||||||
}
|
}
|
||||||
if (key.hintIcon != null && drawHintIcon) {
|
if (key.hintIcon != null && drawHintIcon) {
|
||||||
int drawableWidth = key.width;
|
final int drawableWidth = key.width;
|
||||||
int drawableHeight = key.height;
|
final int drawableHeight = key.height;
|
||||||
int drawableX = 0;
|
final int drawableX = 0;
|
||||||
int drawableY = HINT_ICON_VERTICAL_ADJUSTMENT_PIXEL;
|
final int drawableY = HINT_ICON_VERTICAL_ADJUSTMENT_PIXEL;
|
||||||
Drawable icon = (isManualTemporaryUpperCase
|
Drawable icon = (isManualTemporaryUpperCase
|
||||||
&& key.manualTemporaryUpperCaseHintIcon != null)
|
&& key.manualTemporaryUpperCaseHintIcon != null)
|
||||||
? key.manualTemporaryUpperCaseHintIcon : key.hintIcon;
|
? key.manualTemporaryUpperCaseHintIcon : key.hintIcon;
|
||||||
drawIcon(canvas, icon, drawableX, drawableY, drawableWidth, drawableHeight);
|
drawIcon(canvas, icon, drawableX, drawableY, drawableWidth, drawableHeight);
|
||||||
|
if (DEBUG_SHOW_ALIGN)
|
||||||
|
drawRectangle(canvas, drawableX, drawableY, drawableWidth, drawableHeight,
|
||||||
|
0x80c0c000, new Paint());
|
||||||
}
|
}
|
||||||
canvas.translate(-key.x - kbdPaddingLeft, -key.y - kbdPaddingTop);
|
canvas.translate(-key.x - kbdPaddingLeft, -key.y - kbdPaddingTop);
|
||||||
}
|
}
|
||||||
|
@ -945,13 +951,70 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
|
||||||
mDirtyRect.setEmpty();
|
mDirtyRect.setEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawIcon(Canvas canvas, Drawable icon, int x, int y, int width, int height) {
|
private int getLabelSizeAndSetPaint(CharSequence label, Key key, Paint paint) {
|
||||||
|
// For characters, use large font. For labels like "Done", use small font.
|
||||||
|
final int labelSize;
|
||||||
|
if (label.length() > 1 && key.codes.length < 2) {
|
||||||
|
labelSize = mLabelTextSize;
|
||||||
|
if ((key.labelOption & KEY_LABEL_OPTION_FONT_NORMAL) != 0) {
|
||||||
|
paint.setTypeface(Typeface.DEFAULT);
|
||||||
|
} else {
|
||||||
|
paint.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
labelSize = mKeyTextSize;
|
||||||
|
paint.setTypeface(mKeyTextStyle);
|
||||||
|
}
|
||||||
|
paint.setTextSize(labelSize);
|
||||||
|
return labelSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getLabelCharHeight(int labelSize, Paint paint) {
|
||||||
|
Integer labelHeightValue = mTextHeightCache.get(labelSize);
|
||||||
|
final int labelCharHeight;
|
||||||
|
if (labelHeightValue != null) {
|
||||||
|
labelCharHeight = labelHeightValue;
|
||||||
|
} else {
|
||||||
|
Rect textBounds = new Rect();
|
||||||
|
paint.getTextBounds(KEY_LABEL_REFERENCE_CHAR, 0, 1, textBounds);
|
||||||
|
labelCharHeight = textBounds.height();
|
||||||
|
mTextHeightCache.put(labelSize, labelCharHeight);
|
||||||
|
}
|
||||||
|
return labelCharHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void drawIcon(Canvas canvas, Drawable icon, int x, int y, int width,
|
||||||
|
int height) {
|
||||||
canvas.translate(x, y);
|
canvas.translate(x, y);
|
||||||
icon.setBounds(0, 0, width, height);
|
icon.setBounds(0, 0, width, height);
|
||||||
icon.draw(canvas);
|
icon.draw(canvas);
|
||||||
canvas.translate(-x, -y);
|
canvas.translate(-x, -y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void drawHorizontalLine(Canvas canvas, int y, int w, int color, Paint paint) {
|
||||||
|
paint.setStyle(Paint.Style.STROKE);
|
||||||
|
paint.setStrokeWidth(1.0f);
|
||||||
|
paint.setColor(color);
|
||||||
|
canvas.drawLine(0, y, w, y, paint);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void drawVerticalLine(Canvas canvas, int x, int h, int color, Paint paint) {
|
||||||
|
paint.setStyle(Paint.Style.STROKE);
|
||||||
|
paint.setStrokeWidth(1.0f);
|
||||||
|
paint.setColor(color);
|
||||||
|
canvas.drawLine(x, 0, x, h, paint);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void drawRectangle(Canvas canvas, int x, int y, int w, int h, int color,
|
||||||
|
Paint paint) {
|
||||||
|
paint.setStyle(Paint.Style.STROKE);
|
||||||
|
paint.setStrokeWidth(1.0f);
|
||||||
|
paint.setColor(color);
|
||||||
|
canvas.translate(x, y);
|
||||||
|
canvas.drawRect(0, 0, w, h, paint);
|
||||||
|
canvas.translate(-x, -y);
|
||||||
|
}
|
||||||
|
|
||||||
public void setForeground(boolean foreground) {
|
public void setForeground(boolean foreground) {
|
||||||
mInForeground = foreground;
|
mInForeground = foreground;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class KeyStyles {
|
||||||
try {
|
try {
|
||||||
values[count++] = Integer.parseInt(st.nextToken());
|
values[count++] = Integer.parseInt(st.nextToken());
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
Log.e(TAG, "Error parsing integer CSV " + value);
|
Log.w(TAG, "Error parsing integer CSV " + value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
|
@ -163,6 +163,7 @@ public class KeyStyles {
|
||||||
readDrawable(a, R.styleable.BaseKeyboard_Key_keyIcon);
|
readDrawable(a, R.styleable.BaseKeyboard_Key_keyIcon);
|
||||||
readDrawable(a, R.styleable.BaseKeyboard_Key_iconPreview);
|
readDrawable(a, R.styleable.BaseKeyboard_Key_iconPreview);
|
||||||
readDrawable(a, R.styleable.BaseKeyboard_Key_keyHintIcon);
|
readDrawable(a, R.styleable.BaseKeyboard_Key_keyHintIcon);
|
||||||
|
readDrawable(a, R.styleable.BaseKeyboard_Key_shiftedIcon);
|
||||||
readResourceId(a, R.styleable.BaseKeyboard_Key_popupKeyboard);
|
readResourceId(a, R.styleable.BaseKeyboard_Key_popupKeyboard);
|
||||||
readBoolean(a, R.styleable.BaseKeyboard_Key_isModifier);
|
readBoolean(a, R.styleable.BaseKeyboard_Key_isModifier);
|
||||||
readBoolean(a, R.styleable.BaseKeyboard_Key_isSticky);
|
readBoolean(a, R.styleable.BaseKeyboard_Key_isSticky);
|
||||||
|
|
|
@ -691,9 +691,11 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
||||||
).inflate(THEMES[newLayout], null);
|
).inflate(THEMES[newLayout], null);
|
||||||
tryGC = false;
|
tryGC = false;
|
||||||
} catch (OutOfMemoryError e) {
|
} catch (OutOfMemoryError e) {
|
||||||
|
Log.w(TAG, "load keyboard failed: " + e);
|
||||||
tryGC = LatinIMEUtil.GCUtils.getInstance().tryGCOrWait(
|
tryGC = LatinIMEUtil.GCUtils.getInstance().tryGCOrWait(
|
||||||
mLayoutId + "," + newLayout, e);
|
mLayoutId + "," + newLayout, e);
|
||||||
} catch (InflateException e) {
|
} catch (InflateException e) {
|
||||||
|
Log.w(TAG, "load keyboard failed: " + e);
|
||||||
tryGC = LatinIMEUtil.GCUtils.getInstance().tryGCOrWait(
|
tryGC = LatinIMEUtil.GCUtils.getInstance().tryGCOrWait(
|
||||||
mLayoutId + "," + newLayout, e);
|
mLayoutId + "," + newLayout, e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ import android.view.ViewConfiguration;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class LatinKeyboard extends BaseKeyboard {
|
public class LatinKeyboard extends BaseKeyboard {
|
||||||
|
|
||||||
|
@ -45,7 +46,6 @@ public class LatinKeyboard extends BaseKeyboard {
|
||||||
private static final int OPACITY_FULLY_OPAQUE = 255;
|
private static final int OPACITY_FULLY_OPAQUE = 255;
|
||||||
private static final int SPACE_LED_LENGTH_PERCENT = 80;
|
private static final int SPACE_LED_LENGTH_PERCENT = 80;
|
||||||
|
|
||||||
private final Drawable mShiftedIcon;
|
|
||||||
private Drawable mShiftLockPreviewIcon;
|
private Drawable mShiftLockPreviewIcon;
|
||||||
private final HashMap<Key, Drawable> mNormalShiftIcons = new HashMap<Key, Drawable>();
|
private final HashMap<Key, Drawable> mNormalShiftIcons = new HashMap<Key, Drawable>();
|
||||||
private Drawable mSpaceIcon;
|
private Drawable mSpaceIcon;
|
||||||
|
@ -89,11 +89,9 @@ public class LatinKeyboard extends BaseKeyboard {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mRes = res;
|
mRes = res;
|
||||||
if (id.mColorScheme == BaseKeyboardView.COLOR_SCHEME_BLACK) {
|
if (id.mColorScheme == BaseKeyboardView.COLOR_SCHEME_BLACK) {
|
||||||
mShiftedIcon = res.getDrawable(R.drawable.sym_bkeyboard_shift_locked);
|
|
||||||
mSpaceBarTextShadowColor = res.getColor(
|
mSpaceBarTextShadowColor = res.getColor(
|
||||||
R.color.latinkeyboard_bar_language_shadow_black);
|
R.color.latinkeyboard_bar_language_shadow_black);
|
||||||
} else { // default color scheme is BaseKeyboardView.COLOR_SCHEME_WHITE
|
} else { // default color scheme is BaseKeyboardView.COLOR_SCHEME_WHITE
|
||||||
mShiftedIcon = res.getDrawable(R.drawable.sym_keyboard_shift_locked);
|
|
||||||
mSpaceBarTextShadowColor = res.getColor(
|
mSpaceBarTextShadowColor = res.getColor(
|
||||||
R.color.latinkeyboard_bar_language_shadow_white);
|
R.color.latinkeyboard_bar_language_shadow_white);
|
||||||
}
|
}
|
||||||
|
@ -132,9 +130,10 @@ public class LatinKeyboard extends BaseKeyboard {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setShiftLocked(boolean newShiftLockState) {
|
public boolean setShiftLocked(boolean newShiftLockState) {
|
||||||
|
final Map<Key, Drawable> shiftedIcons = getShiftedIcons();
|
||||||
for (final Key key : getShiftKeys()) {
|
for (final Key key : getShiftKeys()) {
|
||||||
key.on = newShiftLockState;
|
key.on = newShiftLockState;
|
||||||
key.icon = newShiftLockState ? mShiftedIcon : mNormalShiftIcons.get(key);
|
key.icon = newShiftLockState ? shiftedIcons.get(key) : mNormalShiftIcons.get(key);
|
||||||
}
|
}
|
||||||
mShiftState.setShiftLocked(newShiftLockState);
|
mShiftState.setShiftLocked(newShiftLockState);
|
||||||
return true;
|
return true;
|
||||||
|
@ -149,11 +148,12 @@ public class LatinKeyboard extends BaseKeyboard {
|
||||||
if (getShiftKeys().size() == 0)
|
if (getShiftKeys().size() == 0)
|
||||||
return super.setShifted(newShiftState);
|
return super.setShifted(newShiftState);
|
||||||
|
|
||||||
|
final Map<Key, Drawable> shiftedIcons = getShiftedIcons();
|
||||||
for (final Key key : getShiftKeys()) {
|
for (final Key key : getShiftKeys()) {
|
||||||
if (!newShiftState && !mShiftState.isShiftLocked()) {
|
if (!newShiftState && !mShiftState.isShiftLocked()) {
|
||||||
key.icon = mNormalShiftIcons.get(key);
|
key.icon = mNormalShiftIcons.get(key);
|
||||||
} else if (newShiftState && !mShiftState.isShiftedOrShiftLocked()) {
|
} else if (newShiftState && !mShiftState.isShiftedOrShiftLocked()) {
|
||||||
key.icon = mShiftedIcon;
|
key.icon = shiftedIcons.get(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mShiftState.setShifted(newShiftState);
|
return mShiftState.setShifted(newShiftState);
|
||||||
|
|