Settings key always exists in more keys of shortcut/f1 key
This change also
* Fix comman/f1 key for Arabic keyboard.
* Removes "show settings key option" and related stuff.
* Renames and simplifies F2 key to shortcut key on 7 inch tablet.
Change-Id: Ib1cf99ad00d9780a2f0d170260e756771e161521
diff --git a/java/res/xml-sw600dp/key_f2.xml b/java/res/xml-sw600dp/key_f2.xml
deleted file mode 100644
index b25afc1..0000000
--- a/java/res/xml-sw600dp/key_f2.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, 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:f2KeyMode="settings"
- >
- <Key
- latin:keyStyle="settingsKeyStyle"
- latin:keyWidth="fillBoth" />
- </case>
- <case
- latin:f2KeyMode="shortcutIme"
- >
- <switch>
- <case
- latin:shortcutKeyEnabled="true"
- >
- <Key
- latin:keyStyle="shortcutKeyStyle"
- latin:keyWidth="fillBoth" />
- </case>
- <!-- shortcutKeyEnabled="false" -->
- <default>
- <Spacer />
- </default>
- </switch>
- </case>
- <case
- latin:f2KeyMode="shortcutImeOrSettings"
- >
- <switch>
- <case
- latin:shortcutKeyEnabled="true"
- >
- <Key
- latin:keyStyle="shortcutKeyStyle"
- latin:keyWidth="fillBoth" />
- </case>
- <!-- shortcutKeyEnabled="false" -->
- <default>
- <Key
- latin:keyStyle="settingsKeyStyle"
- latin:keyWidth="fillBoth" />
- </default>
- </switch>
- </case>
- <!-- f2KeyMode="none" -->
- <default>
- <Spacer />
- </default>
- </switch>
-</merge>
diff --git a/java/res/xml-sw600dp/key_shortcut.xml b/java/res/xml-sw600dp/key_shortcut.xml
new file mode 100644
index 0000000..8869ab9
--- /dev/null
+++ b/java/res/xml-sw600dp/key_shortcut.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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:shortcutKeyEnabled="true"
+ latin:clobberSettingsKey="false"
+ >
+ <Key
+ latin:keyStyle="shortcutKeyStyle"
+ latin:keyLabelFlags="hasPopupHint"
+ latin:moreKeys="@string/settings_as_more_key"
+ latin:keyWidth="fillBoth" />
+ </case>
+ <case
+ latin:shortcutKeyEnabled="true"
+ latin:clobberSettingsKey="true"
+ >
+ <Key
+ latin:keyStyle="shortcutKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </case>
+ <case
+ latin:shortcutKeyEnabled="false"
+ latin:clobberSettingsKey="false"
+ >
+ <Key
+ latin:keyStyle="settingsKeyStyle"
+ latin:keyWidth="fillBoth" />
+ </case>
+ <!-- shortcutKeyEnabled="false" clobberSettingsKey="true" -->
+ <default>
+ <Spacer />
+ </default>
+ </switch>
+</merge>
diff --git a/java/res/xml-sw600dp/key_styles_common.xml b/java/res/xml-sw600dp/key_styles_common.xml
index 70fc289..bb75b1c 100644
--- a/java/res/xml-sw600dp/key_styles_common.xml
+++ b/java/res/xml-sw600dp/key_styles_common.xml
@@ -21,23 +21,6 @@
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
- <!-- Base key style for the key which may have settings key as popup key -->
- <switch>
- <case
- latin:clobberSettingsKey="true"
- >
- <key-style
- latin:styleName="f2PopupStyle"
- latin:backgroundType="functional" />
- </case>
- <default>
- <key-style
- latin:styleName="f2PopupStyle"
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="\@icon/settingsKey|\@integer/key_settings"
- latin:backgroundType="functional" />
- </default>
- </switch>
<switch>
<case
latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
@@ -112,7 +95,7 @@
latin:keyIconDisabled="iconDisabledShortcutKey"
latin:keyLabelFlags="preserveCase"
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
- latin:parentStyle="f2PopupStyle" />
+ latin:backgroundType="functional" />
<key-style
latin:styleName="settingsKeyStyle"
latin:code="@integer/key_settings"
diff --git a/java/res/xml-sw600dp/row_qwerty4.xml b/java/res/xml-sw600dp/row_qwerty4.xml
index b06508e..3c2f06d 100644
--- a/java/res/xml-sw600dp/row_qwerty4.xml
+++ b/java/res/xml-sw600dp/row_qwerty4.xml
@@ -71,6 +71,6 @@
latin:keyXPos="-10.00%p"
latin:keyWidth="0%p" />
<include
- latin:keyboardLayout="@xml/key_f2" />
+ latin:keyboardLayout="@xml/key_shortcut" />
</Row>
</merge>
diff --git a/java/res/xml-sw600dp/rows_number_normal.xml b/java/res/xml-sw600dp/rows_number_normal.xml
index 3141bbd..1c38a62 100644
--- a/java/res/xml-sw600dp/rows_number_normal.xml
+++ b/java/res/xml-sw600dp/rows_number_normal.xml
@@ -133,6 +133,6 @@
latin:keyXPos="-11.00%p"
latin:keyWidth="0%p" />
<include
- latin:keyboardLayout="@xml/key_f2" />
+ latin:keyboardLayout="@xml/key_shortcut" />
</Row>
</merge>
diff --git a/java/res/xml-sw600dp/rows_number_password.xml b/java/res/xml-sw600dp/rows_number_password.xml
index 0a71f74..59279fb 100644
--- a/java/res/xml-sw600dp/rows_number_password.xml
+++ b/java/res/xml-sw600dp/rows_number_password.xml
@@ -76,6 +76,6 @@
latin:keyXPos="-11.00%p"
latin:keyWidth="0%p" />
<include
- latin:keyboardLayout="@xml/key_f2" />
+ latin:keyboardLayout="@xml/key_shortcut" />
</Row>
</merge>
diff --git a/java/res/xml-sw600dp/rows_phone.xml b/java/res/xml-sw600dp/rows_phone.xml
index d61b4b2..4c896e9 100644
--- a/java/res/xml-sw600dp/rows_phone.xml
+++ b/java/res/xml-sw600dp/rows_phone.xml
@@ -127,6 +127,6 @@
latin:keyXPos="-11.00%p"
latin:keyWidth="0%p" />
<include
- latin:keyboardLayout="@xml/key_f2" />
+ latin:keyboardLayout="@xml/key_shortcut" />
</Row>
</merge>
diff --git a/java/res/xml-sw600dp/rows_symbols.xml b/java/res/xml-sw600dp/rows_symbols.xml
index 61a5644..96695e8 100644
--- a/java/res/xml-sw600dp/rows_symbols.xml
+++ b/java/res/xml-sw600dp/rows_symbols.xml
@@ -167,6 +167,6 @@
latin:keyXPos="-10.00%p"
latin:keyWidth="0%p" />
<include
- latin:keyboardLayout="@xml/key_f2" />
+ latin:keyboardLayout="@xml/key_shortcut" />
</Row>
</merge>
diff --git a/java/res/xml-sw600dp/rows_symbols_shift.xml b/java/res/xml-sw600dp/rows_symbols_shift.xml
index 05824b9..c5eee62 100644
--- a/java/res/xml-sw600dp/rows_symbols_shift.xml
+++ b/java/res/xml-sw600dp/rows_symbols_shift.xml
@@ -148,6 +148,6 @@
latin:keyXPos="-10.00%p"
latin:keyWidth="0%p" />
<include
- latin:keyboardLayout="@xml/key_f2" />
+ latin:keyboardLayout="@xml/key_shortcut" />
</Row>
</merge>