summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorMilad Kakoli <hellcrueldictator@yahoo.com>2012-06-09 20:03:20 +0000
committerEmilio López <turl@tuxfamily.org>2012-06-09 20:44:51 +0000
commit3c27e4971f0157eedde5d4ceb38309e4fa2c1831 (patch)
treedaa144754c76d2d4bd0129cd7ee6e02491b3cf66 /java
parent710724415249553b9cf0834faf1cb1efe0f6af3c (diff)
downloadandroid_packages_inputmethods_LatinIME-3c27e4971f0157eedde5d4ceb38309e4fa2c1831.tar.gz
android_packages_inputmethods_LatinIME-3c27e4971f0157eedde5d4ceb38309e4fa2c1831.tar.bz2
android_packages_inputmethods_LatinIME-3c27e4971f0157eedde5d4ceb38309e4fa2c1831.zip
Add Persian keyboard
Change-Id: Ibedbee3658972bca4672c5daf3109d112b70adf2
Diffstat (limited to 'java')
-rw-r--r--java/res/xml-fa/kbd_qwerty.xml28
-rw-r--r--java/res/xml-fa/kbd_symbols.xml27
-rw-r--r--java/res/xml-fa/kbd_symbols_shift.xml27
-rw-r--r--java/res/xml/kbd_rows_farsi.xml190
-rw-r--r--java/res/xml/method.xml6
5 files changed, 278 insertions, 0 deletions
diff --git a/java/res/xml-fa/kbd_qwerty.xml b/java/res/xml-fa/kbd_qwerty.xml
new file mode 100644
index 000000000..4e88a56f4
--- /dev/null
+++ b/java/res/xml-fa/kbd_qwerty.xml
@@ -0,0 +1,28 @@
+<?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.
+*/
+-->
+<!-- modify Arabic Keyboard to Correct it for Persian Users By Milad Kakoli-->
+<Keyboard
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardLocale="fa"
+ latin:isRtlKeyboard="true"
+>
+ <include
+ latin:keyboardLayout="@xml/kbd_rows_farsi" />
+</Keyboard>
diff --git a/java/res/xml-fa/kbd_symbols.xml b/java/res/xml-fa/kbd_symbols.xml
new file mode 100644
index 000000000..9e5c255d0
--- /dev/null
+++ b/java/res/xml-fa/kbd_symbols.xml
@@ -0,0 +1,27 @@
+<?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.
+*/
+-->
+
+<Keyboard
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:isRtlKeyboard="true"
+>
+ <include
+ latin:keyboardLayout="@xml/kbd_rows_symbols" />
+</Keyboard>
diff --git a/java/res/xml-fa/kbd_symbols_shift.xml b/java/res/xml-fa/kbd_symbols_shift.xml
new file mode 100644
index 000000000..934e6f849
--- /dev/null
+++ b/java/res/xml-fa/kbd_symbols_shift.xml
@@ -0,0 +1,27 @@
+<?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.
+*/
+-->
+
+<Keyboard
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:isRtlKeyboard="true"
+>
+ <include
+ latin:keyboardLayout="@xml/kbd_rows_symbols_shift" />
+</Keyboard>
diff --git a/java/res/xml/kbd_rows_farsi.xml b/java/res/xml/kbd_rows_farsi.xml
new file mode 100644
index 000000000..d0a28537f
--- /dev/null
+++ b/java/res/xml/kbd_rows_farsi.xml
@@ -0,0 +1,190 @@
+<?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.
+*/
+-->
+<!-- modify Arabic Keyboard to Correct it for Persian Users By Milad Kakoli-->
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/kbd_key_styles" />
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <!-- \u0636: ARABIC LETTER DAD -->
+ <Key
+ latin:keyLabel="ض"
+ latin:keyHintLabel="1"
+ latin:moreKeys="1,١" />
+ <!-- \u0635: ARABIC LETTER SAD -->
+ <Key
+ latin:keyLabel="ص"
+ latin:keyHintLabel="2"
+ latin:moreKeys="2,٢" />
+ <!-- \u0642: ARABIC LETTER QAF
+ \u06a8: ARABIC LETTER QAF WITH THREE DOTS ABOVE (deleted it isn't in persian)-->
+ <Key
+ latin:keyLabel="ق"
+ latin:keyHintLabel="3"
+ latin:moreKeys="3,٣" />
+ <!-- \u0641: ARABIC LETTER FEH
+ \u06a4: ARABIC LETTER VEH
+ \u06a2: ARABIC LETTER FEH WITH DOT MOVED BELOW(deleted it isn't in persian)
+ \u06a5: ARABIC LETTER FEH WITH THREE DOTS BELOW(deleted it isn't in persian) -->
+ <Key
+ latin:keyLabel="ف"
+ latin:keyHintLabel="4"
+ latin:moreKeys="4,٤,،" />
+ <!-- \u063a: ARABIC LETTER GHAIN
+ added comma punctoation-->
+ <Key
+ latin:keyLabel="غ"
+ latin:keyHintLabel="5"
+ latin:moreKeys="5,٥" />
+ <!-- \u0639: ARABIC LETTER AIN -->
+ <Key
+ latin:keyLabel="ع"
+ latin:keyHintLabel="6"
+ latin:moreKeys="6,٦" />
+ <!-- \u0647: ARABIC LETTER HEH
+ \ufeeb: ARABIC LETTER HEH INITIAL FORM
+ \u0647\u0640: ARABIC LETTER HEH + Zero width joiner -->
+ <Key
+ latin:keyLabel="ه"
+ latin:keyHintLabel="7"
+ latin:moreKeys="7,٧,/u0629" />
+ <!-- \u062e: ARABIC LETTER KHAH -->
+ <Key
+ latin:keyLabel="خ"
+ latin:keyHintLabel="8"
+ latin:moreKeys="8,٨" />
+ <!-- \u062d: ARABIC LETTER HAH -->
+ <Key
+ latin:keyLabel="ح"
+ latin:keyHintLabel="9"
+ latin:moreKeys="9,٩" />
+ <!-- \u062c: ARABIC LETTER JEEM
+ \u0686: ARABIC LETTER TCHEH -->
+ <Key
+ latin:keyLabel="ج"
+ latin:keyHintLabel="0"
+ latin:moreKeys="0,٠,\u0686"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <!-- \u0634: ARABIC LETTER SHEEN
+ \u069c: ARABIC LETTER SEEN WITH THREE DOTS BELOW AND THREE DOTS ABOVE -->
+ <Key
+ latin:keyLabel="ش"/>
+ <!-- \u0633: ARABIC LETTER SEEN -->
+ <Key
+ latin:keyLabel="س" />
+ <!-- \u064a: ARABIC LETTER YEH
+ \u0626: ARABIC LETTER YEH WITH HAMZA ABOVE
+ \u0649: ARABIC LETTER ALEF MAKSURA -->
+ <Key
+ latin:keyLabel="ي"
+ latin:moreKeys="\u0626,\u0649" />
+ <!-- \u0628: ARABIC LETTER BEH
+ \u067e: ARABIC LETTER PEH -->
+ <Key
+ latin:keyLabel="ب"
+ latin:keyHintLabel="پ"
+ latin:moreKeys="پ" />
+ <!-- \u0644: ARABIC LETTER LAM
+ \ufefb: ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
+ \u0627: ARABIC LETTER ALEF
+ \ufef7: ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
+ \u0623: ARABIC LETTER ALEF WITH HAMZA ABOVE
+ \ufef9: ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM
+ \u0625: ARABIC LETTER ALEF WITH HAMZA BELOW
+ \ufef5: ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
+ \u0622: ARABIC LETTER ALEF WITH MADDA ABOVE -->
+ <Key
+ latin:keyLabel="ل"/>
+ <!-- \u0627: ARABIC LETTER ALEF
+ \u0621: ARABIC LETTER HAMZA
+ \u0671: ARABIC LETTER ALEF WASLA
+ \u0623: ARABIC LETTER ALEF WITH HAMZA ABOVE
+ \u0625: ARABIC LETTER ALEF WITH HAMZA BELOW
+ \u0622: ARABIC LETTER ALEF WITH MADDA ABOVE -->
+ <Key
+ latin:keyLabel="ا"
+ latin:moreKeys="\u0621,\u0671,\u0623,\u0625,\u0622" />
+ <!-- \u062a: ARABIC LETTER TEH
+ \u062b: ARABIC LETTER THEH -->
+ <Key
+ latin:keyLabel="ت" />
+ <!-- \u0646: ARABIC LETTER NOON -->
+ <Key
+ latin:keyLabel="ن" />
+ <!-- \u0645: ARABIC LETTER MEEM -->
+ <Key
+ latin:keyLabel="م" />
+ <!-- \u0643: ARABIC LETTER KAF
+ \u06af: ARABIC LETTER GAF
+ \u06a9: ARABIC LETTER KEHEH -->
+ <Key
+ latin:keyLabel="ك"
+ latin:keyHintLabel="\u06af"
+ latin:moreKeys="\u06af,\u06a9"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <!-- \u0638: ARABIC LETTER ZAH -->
+ <Key
+ latin:keyLabel="ظ"
+ latin:keyXPos="5.0%p" />
+ <!-- \u0637: ARABIC LETTER TAH -->
+ <Key
+ latin:keyLabel="ط" />
+ <!-- \u0632: ARABIC LETTER ZAIN
+ \u0698: ARABIC LETTER JEH -->
+ <Key
+ latin:keyLabel="ز"
+ latin:keyHintLabel="ژ"
+ latin:moreKeys="ژ" />
+ <!-- \u0631: ARABIC LETTER REH -->
+ <Key
+ latin:keyLabel="ر" />
+ <!-- \u0630: ARABIC LETTER THAL -->
+ <Key
+ latin:keyLabel="ذ" />
+ <!-- \u062f: ARABIC LETTER DAL -->
+ <Key
+ latin:keyLabel="د" />
+ <!-- \u0629: ARABIC LETTER TEH MARBUTA -->
+ <Key
+ latin:keyLabel="ث" />
+ <!-- \u0648: ARABIC LETTER WAW
+ \u0624: ARABIC LETTER WAW WITH HAMZA ABOVE -->
+ <Key
+ latin:keyLabel="و"
+ latin:moreKeys="ؤ" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight"
+ latin:visualInsetsLeft="1%p" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/kbd_qwerty_row4" />
+</merge>
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index b7aaaea0b..abe3f3661 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -47,6 +47,12 @@
/>
<subtype android:icon="@drawable/ic_subtype_keyboard"
android:label="@string/subtype_generic"
+ android:imeSubtypeLocale="fa"
+ android:imeSubtypeMode="keyboard"
+ android:imeSubtypeExtraValue="SupportTouchPositionCorrection"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:label="@string/subtype_generic"
android:imeSubtypeLocale="cs"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection"