Dictionary: fixed problem with package name different from Keyboard package name

Added settings
Added broadcast and receiver for lock button
Implemented simple 1-row-keyboard
This commit is contained in:
Philipp Crocoll 2014-01-24 06:23:12 +01:00
parent 44c7ca0d03
commit e0c234f9b1
45 changed files with 857 additions and 328 deletions

View File

@ -350,53 +350,54 @@ containing a value of this type.
public static int sym_bkeyboard_shift_locked=0x7f02005c;
public static int sym_bkeyboard_space=0x7f02005d;
public static int sym_bkeyboard_tab=0x7f02005e;
public static int sym_keyboard_123_mic=0x7f02005f;
public static int sym_keyboard_delete=0x7f020060;
public static int sym_keyboard_done=0x7f020061;
public static int sym_keyboard_feedback_123_mic=0x7f020062;
public static int sym_keyboard_feedback_delete=0x7f020063;
public static int sym_keyboard_feedback_done=0x7f020064;
public static int sym_keyboard_feedback_kp2a=0x7f020065;
public static int sym_keyboard_feedback_language_arrows_left=0x7f020066;
public static int sym_keyboard_feedback_language_arrows_right=0x7f020067;
public static int sym_keyboard_feedback_mic=0x7f020068;
public static int sym_keyboard_feedback_numalt=0x7f020069;
public static int sym_keyboard_feedback_return=0x7f02006a;
public static int sym_keyboard_feedback_search=0x7f02006b;
public static int sym_keyboard_feedback_settings=0x7f02006c;
public static int sym_keyboard_feedback_shift=0x7f02006d;
public static int sym_keyboard_feedback_shift_locked=0x7f02006e;
public static int sym_keyboard_feedback_space=0x7f02006f;
public static int sym_keyboard_feedback_tab=0x7f020070;
public static int sym_keyboard_kp2a=0x7f020071;
public static int sym_keyboard_language_arrows_left=0x7f020072;
public static int sym_keyboard_language_arrows_right=0x7f020073;
public static int sym_keyboard_mic=0x7f020074;
public static int sym_keyboard_num0=0x7f020075;
public static int sym_keyboard_num1=0x7f020076;
public static int sym_keyboard_num2=0x7f020077;
public static int sym_keyboard_num3=0x7f020078;
public static int sym_keyboard_num4=0x7f020079;
public static int sym_keyboard_num5=0x7f02007a;
public static int sym_keyboard_num6=0x7f02007b;
public static int sym_keyboard_num7=0x7f02007c;
public static int sym_keyboard_num8=0x7f02007d;
public static int sym_keyboard_num9=0x7f02007e;
public static int sym_keyboard_numalt=0x7f02007f;
public static int sym_keyboard_numpound=0x7f020080;
public static int sym_keyboard_numstar=0x7f020081;
public static int sym_keyboard_return=0x7f020082;
public static int sym_keyboard_search=0x7f020083;
public static int sym_keyboard_settings=0x7f020084;
public static int sym_keyboard_shift=0x7f020085;
public static int sym_keyboard_shift_lock=0x7f020086;
public static int sym_keyboard_shift_locked=0x7f020087;
public static int sym_keyboard_space=0x7f020088;
public static int sym_keyboard_space_led=0x7f020089;
public static int sym_keyboard_tab=0x7f02008a;
public static int voice_ime_background=0x7f02008b;
public static int voice_swipe_hint=0x7f02008c;
public static int working=0x7f02008d;
public static int sym_keyboard=0x7f02005f;
public static int sym_keyboard_123_mic=0x7f020060;
public static int sym_keyboard_delete=0x7f020061;
public static int sym_keyboard_done=0x7f020062;
public static int sym_keyboard_feedback_123_mic=0x7f020063;
public static int sym_keyboard_feedback_delete=0x7f020064;
public static int sym_keyboard_feedback_done=0x7f020065;
public static int sym_keyboard_feedback_kp2a=0x7f020066;
public static int sym_keyboard_feedback_language_arrows_left=0x7f020067;
public static int sym_keyboard_feedback_language_arrows_right=0x7f020068;
public static int sym_keyboard_feedback_mic=0x7f020069;
public static int sym_keyboard_feedback_numalt=0x7f02006a;
public static int sym_keyboard_feedback_return=0x7f02006b;
public static int sym_keyboard_feedback_search=0x7f02006c;
public static int sym_keyboard_feedback_settings=0x7f02006d;
public static int sym_keyboard_feedback_shift=0x7f02006e;
public static int sym_keyboard_feedback_shift_locked=0x7f02006f;
public static int sym_keyboard_feedback_space=0x7f020070;
public static int sym_keyboard_feedback_tab=0x7f020071;
public static int sym_keyboard_kp2a=0x7f020072;
public static int sym_keyboard_language_arrows_left=0x7f020073;
public static int sym_keyboard_language_arrows_right=0x7f020074;
public static int sym_keyboard_mic=0x7f020075;
public static int sym_keyboard_num0=0x7f020076;
public static int sym_keyboard_num1=0x7f020077;
public static int sym_keyboard_num2=0x7f020078;
public static int sym_keyboard_num3=0x7f020079;
public static int sym_keyboard_num4=0x7f02007a;
public static int sym_keyboard_num5=0x7f02007b;
public static int sym_keyboard_num6=0x7f02007c;
public static int sym_keyboard_num7=0x7f02007d;
public static int sym_keyboard_num8=0x7f02007e;
public static int sym_keyboard_num9=0x7f02007f;
public static int sym_keyboard_numalt=0x7f020080;
public static int sym_keyboard_numpound=0x7f020081;
public static int sym_keyboard_numstar=0x7f020082;
public static int sym_keyboard_return=0x7f020083;
public static int sym_keyboard_search=0x7f020084;
public static int sym_keyboard_settings=0x7f020085;
public static int sym_keyboard_shift=0x7f020086;
public static int sym_keyboard_shift_lock=0x7f020087;
public static int sym_keyboard_shift_locked=0x7f020088;
public static int sym_keyboard_space=0x7f020089;
public static int sym_keyboard_space_led=0x7f02008a;
public static int sym_keyboard_tab=0x7f02008b;
public static int voice_ime_background=0x7f02008c;
public static int voice_swipe_hint=0x7f02008d;
public static int working=0x7f02008e;
}
public static final class id {
public static int LatinKeyboardBaseView=0x7f070007;
@ -440,6 +441,11 @@ containing a value of this type.
public static int key_delete=0x7f0a0010;
public static int key_f1=0x7f0a0013;
public static int key_kp2a=0x7f0a0014;
public static int key_kp2a_alpha=0x7f0a0017;
public static int key_kp2a_lock=0x7f0a0019;
public static int key_kp2a_pass=0x7f0a0016;
public static int key_kp2a_switch=0x7f0a0018;
public static int key_kp2a_user=0x7f0a0015;
public static int key_return=0x7f0a000c;
/** Keycode for F1 (function) key. This one switches between language switch & comma/.com
*/
@ -709,6 +715,21 @@ containing a value of this type.
/** appears above image showing how to access keyboard settings
*/
public static int keyboard_settings=0x7f0c0076;
public static int kp2a_auto_fill=0x7f0c0095;
public static int kp2a_auto_fill_summary=0x7f0c0096;
public static int kp2a_lock_on_sendgodone=0x7f0c009b;
public static int kp2a_lock_on_sendgodone_summary=0x7f0c009c;
public static int kp2a_password=0x7f0c0093;
public static int kp2a_prefs=0x7f0c0094;
public static int kp2a_remember_auto_fill=0x7f0c0097;
public static int kp2a_remember_auto_fill_summary=0x7f0c0098;
public static int kp2a_simple_keyboard=0x7f0c0099;
public static int kp2a_simple_keyboard_summary=0x7f0c009a;
public static int kp2a_switch_on_sendgodone=0x7f0c009d;
public static int kp2a_switch_on_sendgodone_summary=0x7f0c009e;
public static int kp2a_switch_rooted=0x7f0c009f;
public static int kp2a_switch_rooted_summary=0x7f0c00a0;
public static int kp2a_user=0x7f0c0092;
/** Label for "switch to alphabetic" key. Must be short to fit on key!
*/
public static int label_alpha_key=0x7f0c0057;
@ -986,29 +1007,32 @@ containing a value of this type.
}
public static final class xml {
public static int dictionary=0x7f050000;
public static int kbd_phone=0x7f050001;
public static int kbd_phone_black=0x7f050002;
public static int kbd_phone_symbols=0x7f050003;
public static int kbd_phone_symbols_black=0x7f050004;
public static int kbd_popup_narrow_template=0x7f050005;
public static int kbd_popup_template=0x7f050006;
public static int kbd_qwerty=0x7f050007;
public static int kbd_qwerty_black=0x7f050008;
public static int kbd_symbols=0x7f050009;
public static int kbd_symbols_black=0x7f05000a;
public static int kbd_symbols_shift=0x7f05000b;
public static int kbd_symbols_shift_black=0x7f05000c;
public static int language_prefs=0x7f05000d;
public static int method=0x7f05000e;
public static int popup_at=0x7f05000f;
public static int popup_comma=0x7f050010;
public static int popup_domains=0x7f050011;
public static int popup_mic=0x7f050012;
public static int popup_punctuation=0x7f050013;
public static int popup_slash=0x7f050014;
public static int popup_smileys=0x7f050015;
public static int prefs=0x7f050016;
public static int prefs_for_debug=0x7f050017;
public static int kbd_kp2a=0x7f050001;
public static int kbd_kp2a_black=0x7f050002;
public static int kbd_phone=0x7f050003;
public static int kbd_phone_black=0x7f050004;
public static int kbd_phone_symbols=0x7f050005;
public static int kbd_phone_symbols_black=0x7f050006;
public static int kbd_popup_narrow_template=0x7f050007;
public static int kbd_popup_template=0x7f050008;
public static int kbd_qwerty=0x7f050009;
public static int kbd_qwerty_black=0x7f05000a;
public static int kbd_symbols=0x7f05000b;
public static int kbd_symbols_black=0x7f05000c;
public static int kbd_symbols_shift=0x7f05000d;
public static int kbd_symbols_shift_black=0x7f05000e;
public static int language_prefs=0x7f05000f;
public static int method=0x7f050010;
public static int popup_at=0x7f050011;
public static int popup_comma=0x7f050012;
public static int popup_domains=0x7f050013;
public static int popup_kp2a=0x7f050014;
public static int popup_mic=0x7f050015;
public static int popup_punctuation=0x7f050016;
public static int popup_slash=0x7f050017;
public static int popup_smileys=0x7f050018;
public static int prefs=0x7f050019;
public static int prefs_for_debug=0x7f05001a;
}
public static final class styleable {
/** Attributes that can be used with a LatinKeyboardBaseView.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 763 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="kp2a_user">Benutzer</string>
<string name="kp2a_password">Passwort</string>
</resources>

View File

@ -30,4 +30,11 @@
<integer name="key_voice">-102</integer>
<integer name="key_f1">-103</integer>
<integer name="key_kp2a">-200</integer>
<integer name="key_kp2a_user">-201</integer>
<integer name="key_kp2a_pass">-202</integer>
<integer name="key_kp2a_alpha">-203</integer>
<integer name="key_kp2a_switch">-204</integer>
<integer name="key_kp2a_lock">-205</integer>
</resources>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="change_entry">Select another entry</string>
<string name="open_entry">Select entry</string>
<string name="open_entry_for_app">Search for entry with "%1$s"</string>
<string name="kp2a_user">User</string>
<string name="kp2a_password">Password</string>
<string name="kp2a_prefs">Credential input settings</string>
<string name="kp2a_auto_fill">Auto-Fill enabled</string>
<string name="kp2a_auto_fill_summary">Automatically fill in text when an empty field is entered, if a Keepass2Android entry is available for the keyboard and there is a field which matches the field\'s hint text.</string>
<string name="kp2a_remember_auto_fill">Remember field hint texts</string>
<string name="kp2a_remember_auto_fill_summary">If a field is filled by manually selecting the Keepass2Android field, remember which field was entered into the field. The field is later redetected by its hint text.</string>
<string name="kp2a_simple_keyboard">Simple keyboard</string>
<string name="kp2a_simple_keyboard_summary">Show the simple 1-row keyboard if an entry is available for the keyboard. If disabled, a dialog is shown when the Keepass2Android key is pressed.</string>
<string name="kp2a_lock_on_sendgodone">Lock database when done</string>
<string name="kp2a_lock_on_sendgodone_summary">When pressing the Done/Send/Go key on the simple 1-row keyboard, automatically lock the database.</string>
<string name="kp2a_switch_on_sendgodone">Switch keyboard when done</string>
<string name="kp2a_switch_on_sendgodone_summary">When pressing the Done/Send/Go key on the simple 1-row keyboard, switch the keyboard.</string>
<string name="kp2a_switch_rooted">Auto-switch on rooted devices</string>
<string name="kp2a_switch_rooted_summary">On rooted devices, it is possible to automatically switch to the Keepass2Android keyboard (after search for an entry or by clicking the KP2A keyboard notification) and to switch back to the previous keyboard without showing the Input method picker. This also requires to install the Secure Settings apps. See the KP2A documentation for more information!</string>
</resources>

View File

@ -351,7 +351,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -389,7 +389,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -427,7 +427,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -465,7 +465,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -504,7 +504,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"

View File

@ -323,7 +323,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -355,7 +355,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -387,7 +387,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -419,7 +419,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -452,7 +452,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key

View File

@ -330,6 +330,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:isModifier="true" />
<Key
@ -365,10 +366,10 @@
android:keyWidth="15%p"
android:isModifier="true"
android:keyEdgeFlags="left" />
<Key
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -406,7 +407,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -444,7 +445,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -483,7 +484,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"

View File

@ -302,7 +302,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -334,7 +334,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:keyLabel="/" />
<Key
@ -366,7 +366,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:keyLabel="\@" />
<Key
@ -398,7 +398,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -431,7 +431,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key

View File

@ -331,7 +331,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -369,7 +369,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -407,7 +407,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -445,7 +445,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -484,7 +484,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"

View File

@ -303,7 +303,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -335,7 +335,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -367,7 +367,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -399,7 +399,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -432,7 +432,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key

View File

@ -289,7 +289,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -327,7 +327,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -365,7 +365,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -403,7 +403,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -442,7 +442,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"

View File

@ -261,7 +261,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -293,7 +293,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -325,7 +325,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -357,7 +357,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -390,7 +390,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key

View File

@ -351,7 +351,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -389,7 +389,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -427,7 +427,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -465,7 +465,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -504,7 +504,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"

View File

@ -323,7 +323,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -355,7 +355,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -387,7 +387,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -419,7 +419,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -452,7 +452,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key

View File

@ -329,7 +329,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -367,7 +367,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -405,7 +405,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -443,7 +443,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -482,7 +482,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"

View File

@ -301,7 +301,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -333,7 +333,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -365,7 +365,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -397,7 +397,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -430,7 +430,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key

View File

@ -322,7 +322,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -360,7 +360,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -398,7 +398,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -436,7 +436,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -475,7 +475,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"

View File

@ -294,7 +294,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -326,7 +326,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -358,7 +358,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -390,7 +390,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -423,7 +423,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key

View File

@ -352,7 +352,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -390,7 +390,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -428,7 +428,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -466,7 +466,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -505,7 +505,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"

View File

@ -325,7 +325,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -357,7 +357,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -389,7 +389,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -421,7 +421,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key
@ -454,7 +454,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard
xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="15.67%p"
android:horizontalGap="0px"
android:verticalGap="@dimen/key_bottom_gap"
android:keyHeight="@dimen/key_height"
>
<Row
android:rowEdgeFlags="top"
>
<Key
android:codes="@integer/key_kp2a_alpha"
android:keyLabel="@string/label_alpha_key"
android:keyWidth="12%p"
android:isModifier="true"
android:keyEdgeFlags="left" />
<Key
android:codes="@integer/key_kp2a_user"
android:keyLabel="@string/kp2a_user"
android:keyWidth="20%p"
/>
<Key
android:codes="@integer/key_kp2a_pass"
android:keyLabel="@string/kp2a_password"
android:keyWidth="20%p"
/>
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:keyWidth="12%p"
android:isModifier="true" />
<Key
android:codes="@integer/key_delete"
android:keyIcon="@drawable/sym_keyboard_delete"
android:iconPreview="@drawable/sym_keyboard_feedback_delete"
android:keyWidth="12%p"
android:isModifier="true"
android:isRepeatable="true"
/>
<Key
android:codes="@integer/key_return"
android:keyIcon="@drawable/sym_keyboard_return"
android:iconPreview="@drawable/sym_keyboard_feedback_return"
android:keyWidth="12%p"
android:isModifier="true"
/>
<Key
android:codes="@integer/key_kp2a_lock"
android:keyIcon="@android:drawable/ic_lock_lock"
android:keyWidth="12%p"
android:isModifier="true"
android:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard
xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="15.67%p"
android:horizontalGap="0px"
android:verticalGap="@dimen/key_bottom_gap"
android:keyHeight="@dimen/key_height"
>
<Row
android:rowEdgeFlags="top"
>
<Key
android:codes="@integer/key_kp2a_alpha"
android:keyLabel="@string/label_alpha_key"
android:keyWidth="12%p"
android:isModifier="true"
android:keyEdgeFlags="left" />
<Key
android:codes="@integer/key_kp2a_user"
android:keyLabel="@string/kp2a_user"
android:keyWidth="20%p"
/>
<Key
android:codes="@integer/key_kp2a_pass"
android:keyLabel="@string/kp2a_password"
android:keyWidth="20%p"
/>
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:keyWidth="12%p"
android:isModifier="true" />
<Key
android:codes="@integer/key_delete"
android:keyIcon="@drawable/sym_bkeyboard_delete"
android:iconPreview="@drawable/sym_keyboard_feedback_delete"
android:keyWidth="12%p"
android:isRepeatable="true"
/>
<Key
android:codes="@integer/key_return"
android:keyIcon="@drawable/sym_bkeyboard_return"
android:iconPreview="@drawable/sym_keyboard_feedback_return"
android:keyWidth="12%p"
android:isModifier="true"
/>
<Key
android:codes="@integer/key_kp2a_lock"
android:keyIcon="@android:drawable/ic_lock_lock"
android:keyWidth="12%p"
android:isModifier="true"
android:keyEdgeFlags="right"/>
</Row>
</Keyboard>

View File

@ -92,10 +92,18 @@
<Key
android:codes="48"
android:keyIcon="@drawable/sym_keyboard_num0" />
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:keyWidth="13.33%p"
/>
<Key
android:codes="@integer/key_space"
android:keyIcon="@drawable/sym_keyboard_space"
android:keyWidth="13.33%p"
android:iconPreview="@drawable/sym_keyboard_feedback_space" />
<Key
android:codes="@integer/key_return"
android:keyIcon="@drawable/sym_keyboard_return"

View File

@ -88,10 +88,19 @@
<Key
android:codes="48"
android:keyIcon="@drawable/sym_bkeyboard_num0" />
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:keyWidth="13.33%p"
/>
<Key
android:codes="@integer/key_space"
android:keyIcon="@drawable/sym_bkeyboard_space"
android:keyWidth="13.33%p"
android:iconPreview="@drawable/sym_keyboard_feedback_space" />
<Key
android:codes="@integer/key_return"
android:keyIcon="@drawable/sym_bkeyboard_return"

View File

@ -321,10 +321,11 @@
android:keyWidth="15%p"
android:isModifier="true"
android:keyEdgeFlags="left" />
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
@ -359,10 +360,11 @@
android:isModifier="true"
android:keyEdgeFlags="left" />
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
android:isModifier="true" />
@ -396,10 +398,11 @@
android:isModifier="true"
android:keyEdgeFlags="left" />
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
android:isModifier="true" />
@ -434,9 +437,10 @@
android:keyEdgeFlags="left" />
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
android:isModifier="true" />
@ -472,9 +476,10 @@
android:keyEdgeFlags="left" />
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key
android:codes="@integer/key_f1"
android:isModifier="true" />

View File

@ -293,9 +293,10 @@
android:keyLabel="@string/label_symbol_key"
android:keyWidth="15%p"
android:keyEdgeFlags="left" />
<Key
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
<Key
android:codes="@integer/key_f1" />
@ -324,9 +325,10 @@
android:keyLabel="@string/label_symbol_key"
android:keyWidth="15%p"
android:keyEdgeFlags="left" />
<Key
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
<Key
android:codes="@integer/key_f1" />
@ -355,11 +357,12 @@
android:keyLabel="@string/label_symbol_key"
android:keyWidth="15%p"
android:keyEdgeFlags="left" />
<Key
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
<Key
<Key
android:codes="@integer/key_f1" />
<Key
android:codes="@integer/key_space"
@ -389,6 +392,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
<Key
android:codes="@integer/key_f1" />
@ -421,6 +425,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
<Key
android:codes="@integer/key_f1" />

View File

@ -187,7 +187,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true"/>
<Key
android:codes="@integer/key_f1"

View File

@ -180,7 +180,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:codes="@integer/key_f1" />
<Key

View File

@ -164,7 +164,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_keyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a"
android:popupKeyboard="@xml/popup_kp2a"
android:isModifier="true" />
<Key

View File

@ -157,7 +157,7 @@
<Key
android:codes="@integer/key_kp2a"
android:keyIcon="@drawable/sym_bkeyboard_kp2a"
android:iconPreview="@drawable/sym_keyboard_feedback_kp2a" />
android:popupKeyboard="@xml/popup_kp2a" />
<Key
android:keyLabel="„" />
<Key

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Keyboard
xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:keyHeight="@dimen/popup_key_height"
>
<Row
android:rowEdgeFlags="top|bottom"
>
<Key
android:codes="@integer/key_settings"
android:keyIcon="@drawable/sym_keyboard_settings"
android:keyEdgeFlags="left" />
<Key android:codes="@integer/key_kp2a_switch"
android:keyIcon="@drawable/sym_keyboard"
android:keyEdgeFlags="right" />
</Row>
</Keyboard>

View File

@ -17,6 +17,8 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/english_ime_settings"
android:key="english_ime_settings">
<CheckBoxPreference
android:key="vibrate_on"
@ -52,22 +54,61 @@
android:defaultValue="true"
/>
<ListPreference
android:key="settings_key"
android:title="@string/prefs_settings_key"
android:persistent="true"
android:entryValues="@array/settings_key_modes_values"
android:entries="@array/settings_key_modes"
android:defaultValue="@string/settings_key_mode_auto"
<PreferenceCategory
android:title="@string/kp2a_prefs"
android:key="kp2a_settings">
<CheckBoxPreference
android:key="kp2a_auto_fill"
android:title="@string/kp2a_auto_fill"
android:summary="@string/kp2a_auto_fill_summary"
android:persistent="true"
android:defaultValue="true"
/>
<PreferenceScreen
android:title="@string/language_selection_title"
android:summary="@string/language_selection_summary">
<intent
android:action="keepass2android.softkeyboard.INPUT_LANGUAGE_SELECTION"/>
</PreferenceScreen>
<CheckBoxPreference
android:key="kp2a_remember_auto_fill"
android:title="@string/kp2a_remember_auto_fill"
android:summary="@string/kp2a_remember_auto_fill_summary"
android:persistent="true"
android:defaultValue="true"
android:dependency="kp2a_auto_fill"
/>
<CheckBoxPreference
android:key="kp2a_simple_keyboard"
android:title="@string/kp2a_simple_keyboard"
android:summary="@string/kp2a_simple_keyboard_summary"
android:persistent="true"
android:defaultValue="true"
/>
<CheckBoxPreference
android:key="kp2a_lock_on_sendgodone"
android:title="@string/kp2a_lock_on_sendgodone"
android:summary="@string/kp2a_lock_on_sendgodone_summary"
android:persistent="true"
android:defaultValue="false"
android:dependency="kp2a_simple_keyboard"
/>
<CheckBoxPreference
android:key="kp2a_switch_on_sendgodone"
android:title="@string/kp2a_switch_on_sendgodone"
android:summary="@string/kp2a_switch_on_sendgodone_summary"
android:persistent="true"
android:defaultValue="false"
android:dependency="kp2a_simple_keyboard"
/>
<CheckBoxPreference
android:key="kp2a_switch_rooted"
android:title="@string/kp2a_switch_rooted"
android:summary="@string/kp2a_switch_rooted_summary"
android:persistent="true"
android:defaultValue="false"
/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/prediction_category"
android:key="prediction_settings">

View File

@ -0,0 +1,24 @@
package keepass2android.kbbridge;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import android.text.TextUtils;
public class KeyboardData
{
public static List<StringForTyping> availableFields = new ArrayList<StringForTyping>();
public static String entryName;
public static String entryId;
public static boolean hasData()
{
return !TextUtils.isEmpty(entryId);
}
public static void clear()
{
availableFields.clear();
entryName = entryId = "";
}
}

View File

@ -0,0 +1,19 @@
package keepass2android.kbbridge;
import java.util.ArrayList;
import java.util.HashMap;
public class KeyboardDataBuilder {
private ArrayList<StringForTyping> availableFields = new ArrayList<StringForTyping>();
public void addPair(String displayName, String valueToType)
{
StringForTyping pair = new StringForTyping();
pair.displayName = displayName;
pair.value = valueToType;
availableFields.add(pair);
}
public void commit()
{
KeyboardData.availableFields = this.availableFields;
}
}

View File

@ -0,0 +1,20 @@
package keepass2android.kbbridge;
public class StringForTyping {
public String key; //internal identifier (PwEntry string field key)
public String displayName; //display name for displaying the key (might be translated)
public String value;
@Override
public StringForTyping clone(){
StringForTyping theClone = new StringForTyping();
theClone.key = key;
theClone.displayName = displayName;
theClone.value = value;
return theClone;
}
}

View File

@ -74,7 +74,7 @@ public class BinaryDictionary extends Dictionary {
*/
public BinaryDictionary(Context context, int[] resId, int dicTypeId) {
if (resId != null && resId.length > 0 && resId[0] != 0) {
loadDictionary(context, resId);
loadDictionary(context, resId);
}
mDicTypeId = dicTypeId;
}

View File

@ -16,6 +16,7 @@
package keepass2android.softkeyboard;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.Configuration;
@ -88,7 +89,7 @@ public class InputLanguageSelection extends PreferenceActivity {
pref.setTitle(LanguageSwitcher.toTitleCase(locale.getDisplayName(locale), locale));
boolean checked = isLocaleIn(locale, languageList);
pref.setChecked(checked);
if (hasDictionary(locale)) {
if (hasDictionary(locale, this)) {
pref.setSummary(R.string.has_dictionary);
}
parent.addPreference(pref);
@ -103,7 +104,7 @@ public class InputLanguageSelection extends PreferenceActivity {
return false;
}
private boolean hasDictionary(Locale locale) {
private boolean hasDictionary(Locale locale, Context ctx) {
Resources res = getResources();
Configuration conf = res.getConfiguration();
Locale saveLocale = conf.locale;
@ -111,7 +112,7 @@ public class InputLanguageSelection extends PreferenceActivity {
conf.locale = locale;
res.updateConfiguration(conf, res.getDisplayMetrics());
int[] dictionaries = KP2AKeyboard.getDictionary(res);
int[] dictionaries = KP2AKeyboard.getDictionary(res, ctx);
BinaryDictionary bd = new BinaryDictionary(this, dictionaries, Suggest.DIC_MAIN);
// Is the dictionary larger than a placeholder? Arbitrarily chose a lower limit of

View File

@ -58,7 +58,6 @@ import android.view.inputmethod.ExtractedTextRequest;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
import android.widget.LinearLayout;
import android.widget.Toast;
import keepass2android.kbbridge.StringForTyping;
import keepass2android.softkeyboard.LatinIMEUtil.RingCharBuffer;
@ -81,7 +80,10 @@ import java.util.Map;
public class KP2AKeyboard extends InputMethodService
implements LatinKeyboardBaseView.OnKeyboardActionListener,
SharedPreferences.OnSharedPreferenceChangeListener {
private static final String TAG = "LatinIME";
private static final String KEEPASS2ANDROID_KEYBOARD_CLEARED = "keepass2android.keyboard_cleared";
private static final String KP2A_SAVED_FIELD_HINTS = "savedFieldHints";
private static final String PREF_KP2A_REMEMBER_AUTO_FILL = "kp2a_remember_auto_fill";
private static final String TAG = "LatinIME";
private static final boolean PERF_DEBUG = false;
static final boolean DEBUG = false;
static final boolean TRACE = false;
@ -163,6 +165,15 @@ public class KP2AKeyboard extends InputMethodService
private boolean mPopupOn;
private boolean mAutoCap;
private boolean mQuickFixes;
private boolean mKp2aAutoFillOn;
private boolean mKp2aRememberAutoFill;
private boolean mKp2aEnableSimpleKeyboard;
private boolean mKp2aSwitchKeyboardOnSendGoDone;
private boolean mKp2aLockOnSendGoDone;
private boolean mKp2aSwitchRooted;
private boolean mIsSendGoDone;
private boolean mShowSuggestions;
private boolean mIsShowingHint;
private int mCorrectionMode;
@ -199,6 +210,10 @@ public class KP2AKeyboard extends InputMethodService
// Keeps track of most recently inserted text (multi-character key) for reverting
private CharSequence mEnteredText;
private boolean mRefreshKeyboardRequired;
//KP2A
private boolean mShowKp2aKeyboard; //true if the user wants to see/should see the Kp2a keyboard
private boolean mHadKp2aData; //true if we already had data available in the last session
// For each word, a list of potential replacements, usually from voice.
private Map<String, List<CharSequence>> mWordToSuggestions =
@ -272,6 +287,22 @@ public class KP2AKeyboard extends InputMethodService
}
}
};
private ClearKeyboardBroadcastReceiver mClearKeyboardReceiver;
public class ClearKeyboardBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
mShowKp2aKeyboard = false;
updateKeyboardMode(getCurrentInputEditorInfo());
}
}
@Override
public void onCreate() {
@ -314,14 +345,23 @@ public class KP2AKeyboard extends InputMethodService
registerReceiver(mReceiver, filter);
prefs.registerOnSharedPreferenceChangeListener(this);
//check if we have KP2A data available:
mHadKp2aData = mShowKp2aKeyboard = keepass2android.kbbridge.KeyboardData.hasData();
mClearKeyboardReceiver = new ClearKeyboardBroadcastReceiver();
registerReceiver(mClearKeyboardReceiver, new IntentFilter(KEEPASS2ANDROID_KEYBOARD_CLEARED));
}
/**
* Loads a dictionary or multiple separated dictionary
* @param ctx
* @return returns array of dictionary resource ids
*/
/* package */ static int[] getDictionary(Resources res) {
/* package */ static int[] getDictionary(Resources res, Context ctx) {
String packageName = KP2AKeyboard.class.getPackage().getName();
Log.d("KP2AK", "package of keyboard " + packageName);
XmlResourceParser xrp = res.getXml(R.xml.dictionary);
ArrayList<Integer> dictionaries = new ArrayList<Integer>();
@ -333,7 +373,9 @@ public class KP2AKeyboard extends InputMethodService
if (tag != null) {
if (tag.equals("part")) {
String dictFileName = xrp.getAttributeValue(null, "name");
dictionaries.add(res.getIdentifier(dictFileName, "raw", packageName));
int dictId = res.getIdentifier(dictFileName, "raw", ctx.getPackageName());
Log.d("KP2AK", "Adding " + packageName+"/"+dictFileName+"/"+dictId);
dictionaries.add(dictId);
}
}
}
@ -351,6 +393,8 @@ public class KP2AKeyboard extends InputMethodService
for (int i = 0; i < count; i++) {
dict[i] = dictionaries.get(i);
}
Log.d("KP2AK", "num dicts: " + count);
return dict;
}
@ -369,7 +413,7 @@ public class KP2AKeyboard extends InputMethodService
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
mQuickFixes = sp.getBoolean(PREF_QUICK_FIXES, true);
int[] dictionaries = getDictionary(orig);
int[] dictionaries = getDictionary(orig, this);
mSuggest = new Suggest(this, dictionaries);
updateAutoTextEnabled(saveLocale);
//if (mUserDictionary != null) mUserDictionary.close();
@ -480,89 +524,16 @@ public class KP2AKeyboard extends InputMethodService
mKeyboardSwitcher.makeKeyboards(false);
TextEntryState.newSession(this);
int variation = attribute.inputType & EditorInfo.TYPE_MASK_VARIATION;
mInputTypeNoAutoCorrect = false;
mPredictionOn = false;
mCompletionOn = false;
mCompletions = null;
mCapsLock = false;
mEnteredText = null;
switch (attribute.inputType & EditorInfo.TYPE_MASK_CLASS) {
case EditorInfo.TYPE_CLASS_NUMBER:
case EditorInfo.TYPE_CLASS_DATETIME:
// fall through
// NOTE: For now, we use the phone keyboard for NUMBER and DATETIME until we get
// a dedicated number entry keypad.
// TODO: Use a dedicated number entry keypad here when we get one.
case EditorInfo.TYPE_CLASS_PHONE:
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_PHONE,
attribute.imeOptions);
break;
case EditorInfo.TYPE_CLASS_TEXT:
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,
attribute.imeOptions);
//startPrediction();
mPredictionOn = true;
// Make sure that passwords are not displayed in candidate view
if (variation == EditorInfo.TYPE_TEXT_VARIATION_PASSWORD ||
variation == EditorInfo.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD ) {
mPredictionOn = false;
}
if (variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS
|| variation == EditorInfo.TYPE_TEXT_VARIATION_PERSON_NAME) {
mAutoSpace = false;
} else {
mAutoSpace = true;
}
if (variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS) {
mPredictionOn = false;
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_EMAIL,
attribute.imeOptions);
} else if (variation == EditorInfo.TYPE_TEXT_VARIATION_URI) {
mPredictionOn = false;
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_URL,
attribute.imeOptions);
} else if (variation == EditorInfo.TYPE_TEXT_VARIATION_SHORT_MESSAGE) {
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_IM,
attribute.imeOptions);
} else if (variation == EditorInfo.TYPE_TEXT_VARIATION_FILTER) {
mPredictionOn = false;
} else if (variation == EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT) {
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_WEB,
attribute.imeOptions);
// If it's a browser edit field and auto correct is not ON explicitly, then
// disable auto correction, but keep suggestions on.
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT) == 0) {
mInputTypeNoAutoCorrect = true;
}
}
// If NO_SUGGESTIONS is set, don't do prediction.
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS) != 0) {
mPredictionOn = false;
mInputTypeNoAutoCorrect = true;
}
// If it's not multiline and the autoCorrect flag is not set, then don't correct
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT) == 0 &&
(attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) == 0) {
mInputTypeNoAutoCorrect = true;
}
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {
mPredictionOn = false;
mCompletionOn = isFullscreenMode();
}
break;
default:
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,
attribute.imeOptions);
}
updateKeyboardMode(attribute);
inputView.closing();
mComposing.setLength(0);
mPredicting = false;
mDeleteCount = 0;
mJustAddedAutoSpace = false;
mIsSendGoDone = ((attribute.imeOptions&(EditorInfo.IME_MASK_ACTION|EditorInfo.IME_FLAG_NO_ENTER_ACTION)) == EditorInfo.IME_ACTION_GO)
|| ((attribute.imeOptions&(EditorInfo.IME_MASK_ACTION|EditorInfo.IME_FLAG_NO_ENTER_ACTION)) == EditorInfo.IME_ACTION_DONE)
|| ((attribute.imeOptions&(EditorInfo.IME_MASK_ACTION|EditorInfo.IME_FLAG_NO_ENTER_ACTION)) == EditorInfo.IME_ACTION_SEND);
loadSettings();
updateShiftKeyState(attribute);
@ -572,6 +543,7 @@ public class KP2AKeyboard extends InputMethodService
// If the dictionary is not big enough, don't auto correct
mHasDictionary = mSuggest.hasMainDictionary();
Log.d("KP2AK", "has main dict: " + mHasDictionary);
updateCorrectionMode();
@ -586,7 +558,125 @@ public class KP2AKeyboard extends InputMethodService
if (TRACE) Debug.startMethodTracing("/data/trace/latinime");
}
private void updateKeyboardMode(EditorInfo attribute) {
mInputTypeNoAutoCorrect = false;
mPredictionOn = false;
mCompletionOn = false;
mCompletions = null;
mCapsLock = false;
mEnteredText = null;
int variation = attribute.inputType & EditorInfo.TYPE_MASK_VARIATION;
if (keepass2android.kbbridge.KeyboardData.hasData() !=
mHadKp2aData)
{
if (keepass2android.kbbridge.KeyboardData.hasData())
{
//new data available -> show kp2a keyboard:
mShowKp2aKeyboard = true;
}
else
{
//data no longer available. hide kp2a keyboard:
mShowKp2aKeyboard = false;
}
mHadKp2aData = keepass2android.kbbridge.KeyboardData.hasData();
}
Log.d("KP2AK", "show: " + mShowKp2aKeyboard);
if (mShowKp2aKeyboard)
{
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_KP2A, attribute.imeOptions);
mPredictionOn = false;
mPredicting = false;
mCompletionOn = false;
mInputTypeNoAutoCorrect = true;
}
else
{
switch (attribute.inputType & EditorInfo.TYPE_MASK_CLASS) {
case EditorInfo.TYPE_CLASS_NUMBER:
case EditorInfo.TYPE_CLASS_DATETIME:
// fall through
// NOTE: For now, we use the phone keyboard for NUMBER and DATETIME until we get
// a dedicated number entry keypad.
// TODO: Use a dedicated number entry keypad here when we get one.
case EditorInfo.TYPE_CLASS_PHONE:
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_PHONE,
attribute.imeOptions);
break;
case EditorInfo.TYPE_CLASS_TEXT:
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,
attribute.imeOptions);
//startPrediction();
mPredictionOn = true;
// Make sure that passwords are not displayed in candidate view
if (variation == EditorInfo.TYPE_TEXT_VARIATION_PASSWORD ||
variation == EditorInfo.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD ) {
mPredictionOn = false;
}
if (variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS
|| variation == EditorInfo.TYPE_TEXT_VARIATION_PERSON_NAME) {
mAutoSpace = false;
} else {
mAutoSpace = true;
}
if (variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS) {
mPredictionOn = false;
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_EMAIL,
attribute.imeOptions);
} else if (variation == EditorInfo.TYPE_TEXT_VARIATION_URI) {
mPredictionOn = false;
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_URL,
attribute.imeOptions);
} else if (variation == EditorInfo.TYPE_TEXT_VARIATION_SHORT_MESSAGE) {
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_IM,
attribute.imeOptions);
} else if (variation == EditorInfo.TYPE_TEXT_VARIATION_FILTER) {
mPredictionOn = false;
} else if (variation == EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT) {
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_WEB,
attribute.imeOptions);
// If it's a browser edit field and auto correct is not ON explicitly, then
// disable auto correction, but keep suggestions on.
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT) == 0) {
mInputTypeNoAutoCorrect = true;
}
}
// If NO_SUGGESTIONS is set, don't do prediction.
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS) != 0) {
mPredictionOn = false;
mInputTypeNoAutoCorrect = true;
}
// If it's not multiline and the autoCorrect flag is not set, then don't correct
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT) == 0 &&
(attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) == 0) {
mInputTypeNoAutoCorrect = true;
}
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {
mPredictionOn = false;
mCompletionOn = isFullscreenMode();
}
break;
default:
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,
attribute.imeOptions);
}
}
}
private boolean tryKp2aAutoFill(final EditorInfo editorInfo) {
if (!mKp2aAutoFillOn)
return false;
//auto fill in?
InputConnection ic = getCurrentInputConnection();
if (ic == null) return false;
@ -604,38 +694,20 @@ public class KP2AKeyboard extends InputMethodService
boolean hasTextInField = (et != null) && (!TextUtils.isEmpty(et.text));
if (!hasTextInField) //only auto-fill if target field is empty
{
//try to look up saved field ids:
if (editorInfo.fieldId > -1)
{
SharedPreferences prefs = getApplicationContext().getSharedPreferences("savedFieldIds", MODE_PRIVATE);
String key = editorInfo.packageName+"/"+editorInfo.fieldId;
Log.d("KP2AK", "looking up saved field for "+key);
String fieldKey = prefs.getString(key, "");
if ("".equals(fieldKey) == false)
{
Log.d("KP2AK","Found field "+fieldKey);
if (commitTextForKey(editorInfo, fieldKey))
return true;
}
}
//try to look up saved field hint:
if ((editorInfo.hintText != null) && (editorInfo.hintText.length() > 0))
if (!TextUtils.isEmpty(editorInfo.hintText))
{
SharedPreferences prefs = getApplicationContext().getSharedPreferences("savedFieldHints", MODE_PRIVATE);
SharedPreferences prefs = getApplicationContext().getSharedPreferences(KP2A_SAVED_FIELD_HINTS, MODE_PRIVATE);
String key = editorInfo.packageName+"/"+keepass2android.kbbridge.KeyboardData.entryId+"/"+editorInfo.hintText;
Log.d("KP2AK", "looking up saved field hint for "+key);
String displayName = prefs.getString(key, "");
String savedKey = prefs.getString(key, "");
if ("".equals(displayName) == false)
if ("".equals(savedKey) == false)
{
Log.d("KP2AK","Found field "+displayName);
if (commitTextForKey(editorInfo, displayName))
Log.d("KP2AK","Found field "+savedKey);
if (commitTextForKey(editorInfo, savedKey))
return true;
}
}
@ -895,6 +967,11 @@ public class KP2AKeyboard extends InputMethodService
@Override
public boolean onEvaluateFullscreenMode() {
//no full screen mode if only simple Kp2aKeyboard is shown
if (mShowKp2aKeyboard)
return false;
DisplayMetrics dm = getResources().getDisplayMetrics();
float displayHeight = dm.heightPixels;
// If the display is more than X inches high, don't go to fullscreen mode
@ -1090,11 +1167,7 @@ public class KP2AKeyboard extends InputMethodService
private void onOptionKeyPressed() {
if (!isShowingOptionDialog()) {
if (LatinIMEUtil.hasMultipleEnabledIMEs(this)) {
showOptionsMenu();
} else {
launchSettings();
}
launchSettings();
}
}
@ -1149,6 +1222,21 @@ public class KP2AKeyboard extends InputMethodService
case LatinKeyboardView.KEYCODE_KP2A:
onKp2aKeyPressed();
break;
case LatinKeyboardView.KEYCODE_KP2A_USER:
onKp2aUserKeyPressed();
break;
case LatinKeyboardView.KEYCODE_KP2A_PASSWORD:
onKp2aPasswordKeyPressed();
break;
case LatinKeyboardView.KEYCODE_KP2A_ALPHA:
onKp2aAlphaKeyPressed();
break;
case LatinKeyboardView.KEYCODE_KP2A_SWITCH:
onKp2aSwitchKeyboardPressed();
break;
case LatinKeyboardView.KEYCODE_KP2A_LOCK:
onKp2aLockKeyPressed();
break;
case LatinKeyboardView.KEYCODE_OPTIONS_LONGPRESS:
onOptionKeyLongPressed();
break;
@ -1161,6 +1249,9 @@ public class KP2AKeyboard extends InputMethodService
case 9 /*Tab*/:
sendDownUpKeyEvents(KeyEvent.KEYCODE_TAB);
break;
case KEYCODE_ENTER:
onEnterKey();
//fall through
default:
if (primaryCode != KEYCODE_ENTER) {
mJustAddedAutoSpace = false;
@ -1180,8 +1271,76 @@ public class KP2AKeyboard extends InputMethodService
mEnteredText = null;
}
private void onKp2aKeyPressed() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
private void onEnterKey() {
if ((mIsSendGoDone) && (mKeyboardSwitcher.getKeyboardMode() == KeyboardSwitcher.MODE_KP2A))
{
if (mKp2aSwitchKeyboardOnSendGoDone)
{
//TODO auto switch
showInputMethodPicker();
}
if (mKp2aLockOnSendGoDone)
{
onKp2aLockKeyPressed();
}
}
}
private void onKp2aLockKeyPressed() {
sendBroadcast(new Intent("keepass2android.lock_database"));
}
private void onKp2aSwitchKeyboardPressed() {
showInputMethodPicker();
}
private void onKp2aAlphaKeyPressed() {
mShowKp2aKeyboard = false;
updateKeyboardMode(getCurrentInputEditorInfo());
}
private void onKp2aPasswordKeyPressed() {
commitStringForTyping(findStringForTyping("Password"));
}
private StringForTyping findStringForTyping(String key) {
for (StringForTyping s: keepass2android.kbbridge.KeyboardData.availableFields)
{
if (key.equals(s.key))
{
return s;
}
}
//found nothing: return empty struct:
return new StringForTyping();
}
private void onKp2aUserKeyPressed() {
commitStringForTyping(findStringForTyping("UserName"));
}
private void onKp2aKeyPressed() {
if ((mKeyboardSwitcher.getKeyboardMode() == KeyboardSwitcher.MODE_KP2A)
|| (!mKp2aEnableSimpleKeyboard)
|| (!keepass2android.kbbridge.KeyboardData.hasData()))
{
showKp2aDialog();
return;
}
mShowKp2aKeyboard = true;
updateKeyboardMode(getCurrentInputEditorInfo());
setCandidatesViewShown(false);
}
private void showKp2aDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
String title = "Keepass2Android";
List<StringForTyping> availableFields = keepass2android.kbbridge.KeyboardData.availableFields;
@ -1264,22 +1423,15 @@ public class KP2AKeyboard extends InputMethodService
startActivity(startKp2aIntent);
} else Log.w("KP2AK", "didn't find intent for "+packageName);
} else {
if (attribute.fieldId > 0)
{
SharedPreferences savedFieldIds = getApplicationContext().getSharedPreferences("savedFieldIds", MODE_PRIVATE);
Editor edit = savedFieldIds.edit();
edit.putString(getCurrentInputEditorInfo().packageName+"/"+getCurrentInputEditorInfo().fieldId, items.get(item).key);
edit.commit();
}
Log.d("KP2AK", "committing text for " + items.get(item).key);
commitKp2aString(items.get(item).value, getCurrentInputEditorInfo());
StringForTyping theItem = items.get(item);
commitStringForTyping(theItem);
}
}
});
});
builder.setNegativeButton(android.R.string.cancel,
new DialogInterface.OnClickListener() {
@ -1299,13 +1451,36 @@ public class KP2AKeyboard extends InputMethodService
window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
dialog.show();
}
private void commitStringForTyping(StringForTyping theItem) {
if ((mKp2aRememberAutoFill) && (!TextUtils.isEmpty(getCurrentInputEditorInfo().hintText)))
{
EditorInfo editorInfo = getCurrentInputEditorInfo();
String key = editorInfo.packageName+"/"+keepass2android.kbbridge.KeyboardData.entryId+"/"+editorInfo.hintText;
SharedPreferences prefs = getApplicationContext().getSharedPreferences(KP2A_SAVED_FIELD_HINTS, MODE_PRIVATE);
Editor edit = prefs.edit();
edit.putString(key, theItem.key);
edit.commit();
}
Log.d("KP2AK", "committing text for " + theItem.key);
commitKp2aString(theItem.value, getCurrentInputEditorInfo());
}
public void onText(CharSequence text) {
InputConnection ic = getCurrentInputConnection();
if (ic == null) return;
if (text == null)
{
Log.e("KP2AK", "text = null!");
return;
}
abortCorrection(false);
ic.beginBatchEdit();
if (mPredicting) {
@ -2057,6 +2232,18 @@ public class KP2AKeyboard extends InputMethodService
mReCorrectionEnabled = sharedPreferences.getBoolean(PREF_RECORRECTION_ENABLED,
getResources().getBoolean(R.bool.default_recorrection_enabled));
}
if (PREF_KP2A_REMEMBER_AUTO_FILL.equals(key))
{
if (sharedPreferences.getBoolean(key, true) == false)
{
Log.d("KP2AK", "clearing saved field hints");
SharedPreferences savedHints = getApplicationContext().getSharedPreferences(KP2A_SAVED_FIELD_HINTS, MODE_PRIVATE);
Editor edit = savedHints.edit();
edit.clear();
edit.commit();
}
}
}
public void swipeRight() {
@ -2235,6 +2422,12 @@ public class KP2AKeyboard extends InputMethodService
mAutoCap = sp.getBoolean(PREF_AUTO_CAP, true);
mQuickFixes = sp.getBoolean(PREF_QUICK_FIXES, true);
mKp2aAutoFillOn = sp.getBoolean("kp2a_auto_fill", true);
mKp2aRememberAutoFill = sp.getBoolean(PREF_KP2A_REMEMBER_AUTO_FILL, true);
mKp2aEnableSimpleKeyboard = sp.getBoolean("kp2a_simple_keyboard", true);
mKp2aSwitchKeyboardOnSendGoDone = sp.getBoolean("kp2a_switch_on_sendgodone", false);
mKp2aLockOnSendGoDone = sp.getBoolean("kp2a_lock_on_sendgodone", false);
mKp2aSwitchRooted = sp.getBoolean("kp2a_switch_rooted", false);
mShowSuggestions = sp.getBoolean(PREF_SHOW_SUGGESTIONS, true);

View File

@ -37,6 +37,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
public static final int MODE_EMAIL = 5;
public static final int MODE_IM = 6;
public static final int MODE_WEB = 7;
public static final int MODE_KP2A = 8;
// Main keyboard layouts without the settings key
public static final int KEYBOARDMODE_NORMAL = R.id.mode_normal;
@ -81,6 +82,8 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
private static final int[] KBD_SYMBOLS_SHIFT = new int[] {
R.xml.kbd_symbols_shift, R.xml.kbd_symbols_shift_black};
private static final int[] KBD_QWERTY = new int[] {R.xml.kbd_qwerty, R.xml.kbd_qwerty_black};
private static final int[] KBD_KP2A = new int[] {R.xml.kbd_kp2a, R.xml.kbd_kp2a_black};
private LatinKeyboardView mInputView;
private static final int[] ALPHABET_MODES = {
@ -303,8 +306,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
private KeyboardId getKeyboardId(int mode, int imeOptions, boolean isSymbols) {
int charColorId = getCharColorId();
// TODO: generalize for any KeyboardId
int keyboardRowsResId = KBD_QWERTY[charColorId];
if (isSymbols) {
if (mode == MODE_PHONE) {
return new KeyboardId(KBD_PHONE_SYMBOLS[charColorId]);
@ -314,8 +315,13 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
false);
}
}
// TODO: generalize for any KeyboardId
int keyboardRowsResId = KBD_QWERTY[charColorId];
switch (mode) {
case MODE_NONE:
case MODE_KP2A:
return new KeyboardId(KBD_KP2A[charColorId]);
case MODE_NONE:
LatinImeLogger.logOnWarning(
"getKeyboardId:" + mode + "," + imeOptions + "," + isSymbols);
/* fall through */

View File

@ -71,7 +71,7 @@ public class LatinIMESettings extends PreferenceActivity
.removePreference(mQuickFixes);
}
updateSettingsKeySummary();
}
@Override
@ -83,15 +83,9 @@ public class LatinIMESettings extends PreferenceActivity
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
(new BackupManager(this)).dataChanged();
// If turning on voice input, show dialog
updateSettingsKeySummary();
}
private void updateSettingsKeySummary() {
mSettingsKeyPreference.setSummary(
getResources().getStringArray(R.array.settings_key_modes)
[mSettingsKeyPreference.findIndexOfValue(mSettingsKeyPreference.getValue())]);
}
@Override

View File

@ -38,6 +38,11 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
static final int KEYCODE_NEXT_LANGUAGE = -104;
static final int KEYCODE_PREV_LANGUAGE = -105;
static final int KEYCODE_KP2A = -200;
static final int KEYCODE_KP2A_USER = -201;
static final int KEYCODE_KP2A_PASSWORD = -202;
static final int KEYCODE_KP2A_ALPHA = -203;
static final int KEYCODE_KP2A_SWITCH = -204;
static final int KEYCODE_KP2A_LOCK = -205;
private Keyboard mPhoneKeyboard;

View File

@ -105,6 +105,7 @@ public class Suggest implements Dictionary.WordCallback {
public Suggest(Context context, int[] dictionaryResId) {
mMainDict = new BinaryDictionary(context, dictionaryResId, DIC_MAIN);
Log.d("KP2AK", "main size: " + mMainDict.getSize()+ " " +dictionaryResId[0]);
initPool();
}