am 614cb02a
: Merge "Rename mini keyboard to more keys keyboard"
* commit '614cb02a9183841ec8ea76615c879e1da439cc10': Rename mini keyboard to more keys keyboard
This commit is contained in:
commit
dd1bec7ae4
35 changed files with 246 additions and 236 deletions
|
@ -35,6 +35,6 @@
|
||||||
*;
|
*;
|
||||||
}
|
}
|
||||||
|
|
||||||
-keep class com.android.inputmethod.keyboard.MiniKeyboard$Builder$MiniKeyboardParams {
|
-keep class com.android.inputmethod.keyboard.MoreKeysKeyboard$Builder$MoreKeysKeyboardParams {
|
||||||
<init>(...);
|
<init>(...);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,5 +25,5 @@
|
||||||
<alpha
|
<alpha
|
||||||
android:fromAlpha="0.5"
|
android:fromAlpha="0.5"
|
||||||
android:toAlpha="1.0"
|
android:toAlpha="1.0"
|
||||||
android:duration="@integer/config_mini_keyboard_fadein_anim_time" />
|
android:duration="@integer/config_more_keys_keyboard_fadein_anim_time" />
|
||||||
</set>
|
</set>
|
|
@ -25,5 +25,5 @@
|
||||||
<alpha
|
<alpha
|
||||||
android:fromAlpha="1.0"
|
android:fromAlpha="1.0"
|
||||||
android:toAlpha="0.0"
|
android:toAlpha="0.0"
|
||||||
android:duration="@integer/config_mini_keyboard_fadeout_anim_time" />
|
android:duration="@integer/config_more_keys_keyboard_fadeout_anim_time" />
|
||||||
</set>
|
</set>
|
|
@ -22,11 +22,11 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
style="?attr/miniKeyboardPanelStyle"
|
style="?attr/moreKeysKeyboardPanelStyle"
|
||||||
>
|
>
|
||||||
<com.android.inputmethod.keyboard.MiniKeyboardView
|
<com.android.inputmethod.keyboard.MoreKeysKeyboardView
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
android:id="@+id/mini_keyboard_view"
|
android:id="@+id/more_keys_keyboard_view"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
|
@ -22,7 +22,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
style="?attr/miniKeyboardPanelStyle"
|
style="?attr/moreKeysKeyboardPanelStyle"
|
||||||
>
|
>
|
||||||
<com.android.inputmethod.latin.suggestions.MoreSuggestionsView
|
<com.android.inputmethod.latin.suggestions.MoreSuggestionsView
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
|
<!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
|
||||||
<!-- TODO: Will introduce "grouping marks" to the more characters specification. -->
|
<!-- TODO: Will introduce "grouping marks" to the more characters specification. -->
|
||||||
<string name="more_keys_for_punctuation">"\u060c,\u061b,\u061f,!,:,-,/,\',\",\u0640\u0640\u0640|\u0640,\u064e,\u0650,\u064b,\u064d,\u0670,\u0656,\u0655,\u0654,\u0653,\u0652,\u0651,\u064c,\u064f"</string>
|
<string name="more_keys_for_punctuation">"\u060c,\u061b,\u061f,!,:,-,/,\',\",\u0640\u0640\u0640|\u0640,\u064e,\u0650,\u064b,\u064d,\u0670,\u0656,\u0655,\u0654,\u0653,\u0652,\u0651,\u064c,\u064f"</string>
|
||||||
<integer name="mini_keyboard_column_for_punctuation">9</integer>
|
<integer name="more_keys_keyboard_column_for_punctuation">9</integer>
|
||||||
<string name="keyhintlabel_for_punctuation">\u064b</string>
|
<string name="keyhintlabel_for_punctuation">\u064b</string>
|
||||||
<string name="keylabel_for_symbols_1">"١"</string>
|
<string name="keylabel_for_symbols_1">"١"</string>
|
||||||
<string name="keylabel_for_symbols_2">"٢"</string>
|
<string name="keylabel_for_symbols_2">"٢"</string>
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<dimen name="key_preview_backing_height">72dip</dimen>
|
<dimen name="key_preview_backing_height">72dip</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">0.336in</dimen>
|
<dimen name="more_keys_keyboard_slide_allowance">0.336in</dimen>
|
||||||
<!-- popup_key_height x -1.0 -->
|
<!-- popup_key_height x -1.0 -->
|
||||||
<dimen name="mini_keyboard_vertical_correction">-0.280in</dimen>
|
<dimen name="more_keys_keyboard_vertical_correction">-0.280in</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
Configuration for LatinKeyboardView
|
Configuration for LatinKeyboardView
|
||||||
-->
|
-->
|
||||||
<bool name="config_sliding_key_input_enabled">false</bool>
|
<bool name="config_sliding_key_input_enabled">false</bool>
|
||||||
<!-- Showing mini keyboard, just above the touched point if true, aligned to the key if false -->
|
<!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
|
||||||
<bool name="config_show_mini_keyboard_at_touched_point">true</bool>
|
false -->
|
||||||
|
<bool name="config_show_more_keys_keyboard_at_touched_point">true</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -40,12 +40,12 @@
|
||||||
|
|
||||||
<fraction name="keyboard_bottom_padding_ics">0.0%p</fraction>
|
<fraction name="keyboard_bottom_padding_ics">0.0%p</fraction>
|
||||||
|
|
||||||
<dimen name="mini_keyboard_key_horizontal_padding">6dip</dimen>
|
<dimen name="more_keys_keyboard_key_horizontal_padding">6dip</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="more_keys_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="more_keys_keyboard_vertical_correction">-13.0mm</dimen>
|
||||||
|
|
||||||
<!-- left or right padding of label alignment -->
|
<!-- left or right padding of label alignment -->
|
||||||
<dimen name="key_label_horizontal_padding">6dip</dimen>
|
<dimen name="key_label_horizontal_padding">6dip</dimen>
|
||||||
|
|
|
@ -37,8 +37,9 @@
|
||||||
Configuration for LatinKeyboardView
|
Configuration for LatinKeyboardView
|
||||||
-->
|
-->
|
||||||
<bool name="config_sliding_key_input_enabled">false</bool>
|
<bool name="config_sliding_key_input_enabled">false</bool>
|
||||||
<!-- Showing mini keyboard, just above the touched point if true, aligned to the key if false -->
|
<!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
|
||||||
<bool name="config_show_mini_keyboard_at_touched_point">true</bool>
|
false -->
|
||||||
|
<bool name="config_show_more_keys_keyboard_at_touched_point">true</bool>
|
||||||
<!-- Screen metrics for logging.
|
<!-- Screen metrics for logging.
|
||||||
0 = "mdpi phone screen"
|
0 = "mdpi phone screen"
|
||||||
1 = "hdpi phone screen"
|
1 = "hdpi phone screen"
|
||||||
|
|
|
@ -43,12 +43,12 @@
|
||||||
|
|
||||||
<dimen name="popup_key_height">10.0mm</dimen>
|
<dimen name="popup_key_height">10.0mm</dimen>
|
||||||
|
|
||||||
<dimen name="mini_keyboard_key_horizontal_padding">12dip</dimen>
|
<dimen name="more_keys_keyboard_key_horizontal_padding">12dip</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="more_keys_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="more_keys_keyboard_vertical_correction">-13.0mm</dimen>
|
||||||
|
|
||||||
<!-- left or right padding of label alignment -->
|
<!-- left or right padding of label alignment -->
|
||||||
<dimen name="key_label_horizontal_padding">6dip</dimen>
|
<dimen name="key_label_horizontal_padding">6dip</dimen>
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
<attr name="keyboardViewStyle" format="reference" />
|
<attr name="keyboardViewStyle" format="reference" />
|
||||||
<!-- LatinKeyboardView style -->
|
<!-- LatinKeyboardView style -->
|
||||||
<attr name="latinKeyboardViewStyle" format="reference" />
|
<attr name="latinKeyboardViewStyle" format="reference" />
|
||||||
<!-- MiniKeyboard style -->
|
<!-- MoreKeysKeyboard style -->
|
||||||
<attr name="miniKeyboardStyle" format="reference" />
|
<attr name="moreKeysKeyboardStyle" format="reference" />
|
||||||
<!-- MiniKeyboardView style -->
|
<!-- MoreKeysKeyboardView style -->
|
||||||
<attr name="miniKeyboardViewStyle" format="reference" />
|
<attr name="moreKeysKeyboardViewStyle" format="reference" />
|
||||||
<attr name="miniKeyboardPanelStyle" format="reference" />
|
<attr name="moreKeysKeyboardPanelStyle" format="reference" />
|
||||||
<!-- Suggestions strip style -->
|
<!-- Suggestions strip style -->
|
||||||
<attr name="suggestionsStripBackgroundStyle" format="reference" />
|
<attr name="suggestionsStripBackgroundStyle" format="reference" />
|
||||||
<attr name="suggestionsViewStyle" format="reference" />
|
<attr name="suggestionsViewStyle" format="reference" />
|
||||||
|
@ -152,8 +152,8 @@
|
||||||
<attr name="longPressSpaceKeyTimeout" format="integer" />
|
<attr name="longPressSpaceKeyTimeout" format="integer" />
|
||||||
<!-- Ignore special key timeout while typing in millisecond. -->
|
<!-- Ignore special key timeout while typing in millisecond. -->
|
||||||
<attr name="ignoreSpecialKeyTimeout" format="integer" />
|
<attr name="ignoreSpecialKeyTimeout" format="integer" />
|
||||||
<!-- Mini-keyboard will shown at touched point. -->
|
<!-- More keys keyboard will shown at touched point. -->
|
||||||
<attr name="showMiniKeyboardAtTouchedPoint" format="boolean" />
|
<attr name="showMoreKeysKeyboardAtTouchedPoint" format="boolean" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
<declare-styleable name="SuggestionsView">
|
<declare-styleable name="SuggestionsView">
|
||||||
|
@ -232,7 +232,10 @@
|
||||||
been replaced, those remaining entries are appended at the end of moreKeys. -->
|
been replaced, those remaining entries are appended at the end of moreKeys. -->
|
||||||
<attr name="additionalMoreKeys" format="string" />
|
<attr name="additionalMoreKeys" format="string" />
|
||||||
<!-- Maximum column of more keys keyboard -->
|
<!-- Maximum column of more keys keyboard -->
|
||||||
<attr name="maxMoreKeysColumn" format="integer" />
|
<attr name="maxMoreKeysColumn" format="integer">
|
||||||
|
<!-- This should be aligned with -->
|
||||||
|
<flag name="fixedWidthMoreKeysColumn" value="0x8000000" />
|
||||||
|
</attr>
|
||||||
<attr name="backgroundType" format="enum">
|
<attr name="backgroundType" format="enum">
|
||||||
<!-- This should be aligned with Key.BACKGROUND_TYPE_* -->
|
<!-- This should be aligned with Key.BACKGROUND_TYPE_* -->
|
||||||
<enum name="normal" value="0" />
|
<enum name="normal" value="0" />
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
<integer name="config_delay_update_shift_state">100</integer>
|
<integer name="config_delay_update_shift_state">100</integer>
|
||||||
<integer name="config_duration_of_fadeout_language_on_spacebar">50</integer>
|
<integer name="config_duration_of_fadeout_language_on_spacebar">50</integer>
|
||||||
<integer name="config_final_fadeout_percentage_of_language_on_spacebar">50</integer>
|
<integer name="config_final_fadeout_percentage_of_language_on_spacebar">50</integer>
|
||||||
<integer name="config_mini_keyboard_fadein_anim_time">0</integer>
|
<integer name="config_more_keys_keyboard_fadein_anim_time">0</integer>
|
||||||
<integer name="config_mini_keyboard_fadeout_anim_time">100</integer>
|
<integer name="config_more_keys_keyboard_fadeout_anim_time">100</integer>
|
||||||
<integer name="config_keyboard_grid_width">32</integer>
|
<integer name="config_keyboard_grid_width">32</integer>
|
||||||
<integer name="config_keyboard_grid_height">16</integer>
|
<integer name="config_keyboard_grid_height">16</integer>
|
||||||
<integer name="config_double_spaces_turn_into_period_timeout">1100</integer>
|
<integer name="config_double_spaces_turn_into_period_timeout">1100</integer>
|
||||||
|
@ -69,10 +69,12 @@
|
||||||
<!-- Long pressing shift will invoke caps-lock if > 0, never invoke caps-lock if == 0 -->
|
<!-- Long pressing shift will invoke caps-lock if > 0, never invoke caps-lock if == 0 -->
|
||||||
<integer name="config_long_press_shift_key_timeout">1200</integer>
|
<integer name="config_long_press_shift_key_timeout">1200</integer>
|
||||||
<!-- Long pressing space will invoke IME switcher if > 0, never invoke IME switcher if == 0 -->
|
<!-- Long pressing space will invoke IME switcher if > 0, never invoke IME switcher if == 0 -->
|
||||||
<integer name="config_long_press_space_key_timeout">@integer/config_long_press_key_timeout</integer>
|
<integer name="config_long_press_space_key_timeout">
|
||||||
|
@integer/config_long_press_key_timeout</integer>
|
||||||
<integer name="config_ignore_special_key_timeout">700</integer>
|
<integer name="config_ignore_special_key_timeout">700</integer>
|
||||||
<!-- Showing mini keyboard, just above the touched point if true, aligned to the key if false -->
|
<!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
|
||||||
<bool name="config_show_mini_keyboard_at_touched_point">false</bool>
|
false -->
|
||||||
|
<bool name="config_show_more_keys_keyboard_at_touched_point">false</bool>
|
||||||
<!--
|
<!--
|
||||||
Configuration for auto correction
|
Configuration for auto correction
|
||||||
-->
|
-->
|
||||||
|
@ -88,9 +90,11 @@
|
||||||
will be subject to auto-correction. -->
|
will be subject to auto-correction. -->
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<!-- Threshold of the normalized score of the best suggestion for the spell checker to declare a word to be "recommended" -->
|
<!-- Threshold of the normalized score of the best suggestion for the spell checker to declare
|
||||||
|
a word to be "recommended" -->
|
||||||
<string name="spellchecker_recommended_threshold_value" translatable="false">0.11</string>
|
<string name="spellchecker_recommended_threshold_value" translatable="false">0.11</string>
|
||||||
<!-- Threshold of the normalized score of any dictionary lookup to be offered as a suggestion by the spell checker -->
|
<!-- Threshold of the normalized score of any dictionary lookup to be offered as a suggestion
|
||||||
|
by the spell checker -->
|
||||||
<string name="spellchecker_suggestion_threshold_value" translatable="false">0.03</string>
|
<string name="spellchecker_suggestion_threshold_value" translatable="false">0.03</string>
|
||||||
<!-- Screen metrics for logging.
|
<!-- Screen metrics for logging.
|
||||||
0 = "mdpi phone screen"
|
0 = "mdpi phone screen"
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
|
|
||||||
<dimen name="popup_key_height">0.330in</dimen>
|
<dimen name="popup_key_height">0.330in</dimen>
|
||||||
|
|
||||||
<dimen name="mini_keyboard_horizontal_edges_padding">16dip</dimen>
|
<dimen name="more_keys_keyboard_horizontal_edges_padding">16dip</dimen>
|
||||||
<dimen name="mini_keyboard_key_horizontal_padding">8dip</dimen>
|
<dimen name="more_keys_keyboard_key_horizontal_padding">8dip</dimen>
|
||||||
|
|
||||||
<fraction name="keyboard_top_padding">1.556%p</fraction>
|
<fraction name="keyboard_top_padding">1.556%p</fraction>
|
||||||
<fraction name="keyboard_bottom_padding">4.669%p</fraction>
|
<fraction name="keyboard_bottom_padding">4.669%p</fraction>
|
||||||
|
@ -48,13 +48,13 @@
|
||||||
<fraction name="keyboard_bottom_padding_ics">4.669%p</fraction>
|
<fraction name="keyboard_bottom_padding_ics">4.669%p</fraction>
|
||||||
<fraction name="key_bottom_gap_ics">6.127%p</fraction>
|
<fraction name="key_bottom_gap_ics">6.127%p</fraction>
|
||||||
<fraction name="key_horizontal_gap_ics">1.739%p</fraction>
|
<fraction name="key_horizontal_gap_ics">1.739%p</fraction>
|
||||||
<dimen name="mini_keyboard_horizontal_edges_padding_ics">4dip</dimen>
|
<dimen name="more_keys_keyboard_horizontal_edges_padding_ics">4dip</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">0.396in</dimen>
|
<dimen name="more_keys_keyboard_slide_allowance">0.396in</dimen>
|
||||||
<!-- popup_key_height x -1.0 -->
|
<!-- popup_key_height x -1.0 -->
|
||||||
<dimen name="mini_keyboard_vertical_correction">-0.330in</dimen>
|
<dimen name="more_keys_keyboard_vertical_correction">-0.330in</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. -->
|
||||||
<dimen name="keyboard_vertical_correction">0.0in</dimen>
|
<dimen name="keyboard_vertical_correction">0.0in</dimen>
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<string name="more_keys_for_currency_general">¢,$,€,£,¥,₱</string>
|
<string name="more_keys_for_currency_general">¢,$,€,£,¥,₱</string>
|
||||||
<string name="more_keys_for_smiley">":-)|:-) ,:-(|:-( ,;-)|;-) ,:-P|:-P ,=-O|=-O ,:-*|:-* ,:O|:O ,B-)|B-) ,:-$|:-$ ,:-!|:-! ,:-[|:-[ ,O:-)|O:-) ,:-\\\\|:-\\\\ ,:\'(|:\'( ,:-D|:-D "</string>
|
<string name="more_keys_for_smiley">":-)|:-) ,:-(|:-( ,;-)|;-) ,:-P|:-P ,=-O|=-O ,:-*|:-* ,:O|:O ,B-)|B-) ,:-$|:-$ ,:-!|:-! ,:-[|:-[ ,O:-)|O:-) ,:-\\\\|:-\\\\ ,:\'(|:\'( ,:-D|:-D "</string>
|
||||||
<string name="more_keys_for_punctuation">"\\,,\?,!,:,-,\',\",(,),/,;,+,&,\@"</string>
|
<string name="more_keys_for_punctuation">"\\,,\?,!,:,-,\',\",(,),/,;,+,&,\@"</string>
|
||||||
<integer name="mini_keyboard_column_for_punctuation">7</integer>
|
<integer name="more_keys_keyboard_column_for_punctuation">7</integer>
|
||||||
<string name="keyhintlabel_for_punctuation"></string>
|
<string name="keyhintlabel_for_punctuation"></string>
|
||||||
<string name="keylabel_for_popular_domain">".com"</string>
|
<string name="keylabel_for_popular_domain">".com"</string>
|
||||||
<!-- popular web domains for the locale - most popular, displayed on the keyboard -->
|
<!-- popular web domains for the locale - most popular, displayed on the keyboard -->
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<item name="keyboardHeight">@dimen/keyboardHeight</item>
|
<item name="keyboardHeight">@dimen/keyboardHeight</item>
|
||||||
<item name="maxKeyboardHeight">@fraction/maxKeyboardHeight</item>
|
<item name="maxKeyboardHeight">@fraction/maxKeyboardHeight</item>
|
||||||
<item name="minKeyboardHeight">@fraction/minKeyboardHeight</item>
|
<item name="minKeyboardHeight">@fraction/minKeyboardHeight</item>
|
||||||
<item name="moreKeysTemplate">@xml/kbd_mini_keyboard_template</item>
|
<item name="moreKeysTemplate">@xml/kbd_more_keys_keyboard_template</item>
|
||||||
<item name="keyboardTopPadding">@fraction/keyboard_top_padding</item>
|
<item name="keyboardTopPadding">@fraction/keyboard_top_padding</item>
|
||||||
<item name="keyboardBottomPadding">@fraction/keyboard_bottom_padding</item>
|
<item name="keyboardBottomPadding">@fraction/keyboard_bottom_padding</item>
|
||||||
<item name="keyboardHorizontalEdgesPadding">@fraction/keyboard_horizontal_edges_padding</item>
|
<item name="keyboardHorizontalEdgesPadding">@fraction/keyboard_horizontal_edges_padding</item>
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
<item name="keyPreviewHeight">@dimen/key_preview_height</item>
|
<item name="keyPreviewHeight">@dimen/key_preview_height</item>
|
||||||
<item name="keyPreviewTextRatio">@fraction/key_preview_text_ratio</item>
|
<item name="keyPreviewTextRatio">@fraction/key_preview_text_ratio</item>
|
||||||
<item name="keyPreviewLingerTimeout">@integer/config_key_preview_linger_timeout</item>
|
<item name="keyPreviewLingerTimeout">@integer/config_key_preview_linger_timeout</item>
|
||||||
<item name="moreKeysLayout">@layout/mini_keyboard</item>
|
<item name="moreKeysLayout">@layout/more_keys_keyboard</item>
|
||||||
<item name="verticalCorrection">@dimen/keyboard_vertical_correction</item>
|
<item name="verticalCorrection">@dimen/keyboard_vertical_correction</item>
|
||||||
<item name="shadowColor">#BB000000</item>
|
<item name="shadowColor">#BB000000</item>
|
||||||
<item name="shadowRadius">2.75</item>
|
<item name="shadowRadius">2.75</item>
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
<item name="longPressShiftKeyTimeout">@integer/config_long_press_shift_key_timeout</item>
|
<item name="longPressShiftKeyTimeout">@integer/config_long_press_shift_key_timeout</item>
|
||||||
<item name="longPressSpaceKeyTimeout">@integer/config_long_press_space_key_timeout</item>
|
<item name="longPressSpaceKeyTimeout">@integer/config_long_press_space_key_timeout</item>
|
||||||
<item name="ignoreSpecialKeyTimeout">@integer/config_ignore_special_key_timeout</item>
|
<item name="ignoreSpecialKeyTimeout">@integer/config_ignore_special_key_timeout</item>
|
||||||
<item name="showMiniKeyboardAtTouchedPoint">@bool/config_show_mini_keyboard_at_touched_point</item>
|
<item name="showMoreKeysKeyboardAtTouchedPoint">@bool/config_show_more_keys_keyboard_at_touched_point</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="LatinKeyboardView"
|
name="LatinKeyboardView"
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
<item name="spacebarTextShadowColor">#80000000</item>
|
<item name="spacebarTextShadowColor">#80000000</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MiniKeyboard"
|
name="MoreKeysKeyboard"
|
||||||
parent="Keyboard"
|
parent="Keyboard"
|
||||||
>
|
>
|
||||||
<item name="keyboardTopPadding">0dip</item>
|
<item name="keyboardTopPadding">0dip</item>
|
||||||
|
@ -96,16 +96,16 @@
|
||||||
<item name="horizontalGap">0dip</item>
|
<item name="horizontalGap">0dip</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MiniKeyboardView"
|
name="MoreKeysKeyboardView"
|
||||||
parent="KeyboardView"
|
parent="KeyboardView"
|
||||||
>
|
>
|
||||||
<item name="keyBackground">@drawable/btn_keyboard_key_popup</item>
|
<item name="keyBackground">@drawable/btn_keyboard_key_popup</item>
|
||||||
<item name="verticalCorrection">@dimen/mini_keyboard_vertical_correction</item>
|
<item name="verticalCorrection">@dimen/more_keys_keyboard_vertical_correction</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="MiniKeyboardPanelStyle">
|
<style name="MoreKeysKeyboardPanelStyle">
|
||||||
<item name="android:background">@drawable/keyboard_popup_panel_background</item>
|
<item name="android:background">@drawable/keyboard_popup_panel_background</item>
|
||||||
<item name="android:paddingLeft">@dimen/mini_keyboard_horizontal_edges_padding</item>
|
<item name="android:paddingLeft">@dimen/more_keys_keyboard_horizontal_edges_padding</item>
|
||||||
<item name="android:paddingRight">@dimen/mini_keyboard_horizontal_edges_padding</item>
|
<item name="android:paddingRight">@dimen/more_keys_keyboard_horizontal_edges_padding</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="SuggestionsStripBackgroundStyle">
|
<style name="SuggestionsStripBackgroundStyle">
|
||||||
<item name="android:background">@drawable/keyboard_suggest_strip</item>
|
<item name="android:background">@drawable/keyboard_suggest_strip</item>
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MoreSuggestionsViewStyle"
|
name="MoreSuggestionsViewStyle"
|
||||||
parent="MiniKeyboardView"
|
parent="MoreKeysKeyboardView"
|
||||||
>
|
>
|
||||||
</style>
|
</style>
|
||||||
<style name="SuggestionBackgroundStyle">
|
<style name="SuggestionBackgroundStyle">
|
||||||
|
@ -196,7 +196,7 @@
|
||||||
<item name="spacebarTextShadowColor">#D0FFFFFF</item>
|
<item name="spacebarTextShadowColor">#D0FFFFFF</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MiniKeyboard.Stone"
|
name="MoreKeysKeyboard.Stone"
|
||||||
parent="Keyboard.Stone"
|
parent="Keyboard.Stone"
|
||||||
>
|
>
|
||||||
<item name="keyboardTopPadding">0dip</item>
|
<item name="keyboardTopPadding">0dip</item>
|
||||||
|
@ -204,8 +204,8 @@
|
||||||
<item name="horizontalGap">0dip</item>
|
<item name="horizontalGap">0dip</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MiniKeyboardView.Stone"
|
name="MoreKeysKeyboardView.Stone"
|
||||||
parent="MiniKeyboardView"
|
parent="MoreKeysKeyboardView"
|
||||||
>
|
>
|
||||||
<item name="keyBackground">@drawable/btn_keyboard_key_stone</item>
|
<item name="keyBackground">@drawable/btn_keyboard_key_stone</item>
|
||||||
<item name="keyTextColor">#FF000000</item>
|
<item name="keyTextColor">#FF000000</item>
|
||||||
|
@ -263,7 +263,7 @@
|
||||||
<item name="spacebarTextShadowColor">#80000000</item>
|
<item name="spacebarTextShadowColor">#80000000</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MiniKeyboard.Gingerbread"
|
name="MoreKeysKeyboard.Gingerbread"
|
||||||
parent="Keyboard.Gingerbread"
|
parent="Keyboard.Gingerbread"
|
||||||
>
|
>
|
||||||
<item name="keyboardTopPadding">0dip</item>
|
<item name="keyboardTopPadding">0dip</item>
|
||||||
|
@ -271,8 +271,8 @@
|
||||||
<item name="horizontalGap">0dip</item>
|
<item name="horizontalGap">0dip</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MiniKeyboardView.Gingerbread"
|
name="MoreKeysKeyboardView.Gingerbread"
|
||||||
parent="MiniKeyboardView"
|
parent="MoreKeysKeyboardView"
|
||||||
>
|
>
|
||||||
<item name="android:background">@null</item>
|
<item name="android:background">@null</item>
|
||||||
</style>
|
</style>
|
||||||
|
@ -322,7 +322,7 @@
|
||||||
<item name="spacebarTextShadowColor">#80000000</item>
|
<item name="spacebarTextShadowColor">#80000000</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MiniKeyboard.IceCreamSandwich"
|
name="MoreKeysKeyboard.IceCreamSandwich"
|
||||||
parent="Keyboard.IceCreamSandwich"
|
parent="Keyboard.IceCreamSandwich"
|
||||||
>
|
>
|
||||||
<item name="keyboardTopPadding">0dip</item>
|
<item name="keyboardTopPadding">0dip</item>
|
||||||
|
@ -330,16 +330,16 @@
|
||||||
<item name="horizontalGap">0dip</item>
|
<item name="horizontalGap">0dip</item>
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MiniKeyboardView.IceCreamSandwich"
|
name="MoreKeysKeyboardView.IceCreamSandwich"
|
||||||
parent="MiniKeyboardView"
|
parent="MoreKeysKeyboardView"
|
||||||
>
|
>
|
||||||
<item name="android:background">@null</item>
|
<item name="android:background">@null</item>
|
||||||
<item name="keyBackground">@drawable/btn_keyboard_key_popup_ics</item>
|
<item name="keyBackground">@drawable/btn_keyboard_key_popup_ics</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="MiniKeyboardPanelStyle.IceCreamSandwich">
|
<style name="MoreKeysKeyboardPanelStyle.IceCreamSandwich">
|
||||||
<item name="android:background">@drawable/keyboard_popup_panel_background_holo</item>
|
<item name="android:background">@drawable/keyboard_popup_panel_background_holo</item>
|
||||||
<item name="android:paddingLeft">@dimen/mini_keyboard_horizontal_edges_padding_ics</item>
|
<item name="android:paddingLeft">@dimen/more_keys_keyboard_horizontal_edges_padding_ics</item>
|
||||||
<item name="android:paddingRight">@dimen/mini_keyboard_horizontal_edges_padding_ics</item>
|
<item name="android:paddingRight">@dimen/more_keys_keyboard_horizontal_edges_padding_ics</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="SuggestionsStripBackgroundStyle.IceCreamSandwich">
|
<style name="SuggestionsStripBackgroundStyle.IceCreamSandwich">
|
||||||
<item name="android:background">@drawable/keyboard_suggest_strip_holo</item>
|
<item name="android:background">@drawable/keyboard_suggest_strip_holo</item>
|
||||||
|
@ -365,7 +365,7 @@
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="MoreSuggestionsViewStyle.IceCreamSandwich"
|
name="MoreSuggestionsViewStyle.IceCreamSandwich"
|
||||||
parent="MiniKeyboardView.IceCreamSandwich"
|
parent="MoreKeysKeyboardView.IceCreamSandwich"
|
||||||
>
|
>
|
||||||
</style>
|
</style>
|
||||||
<style name="SuggestionBackgroundStyle.IceCreamSandwich">
|
<style name="SuggestionBackgroundStyle.IceCreamSandwich">
|
||||||
|
@ -373,11 +373,11 @@
|
||||||
</style>
|
</style>
|
||||||
<style
|
<style
|
||||||
name="SuggestionPreviewBackgroundStyle.IceCreamSandwich"
|
name="SuggestionPreviewBackgroundStyle.IceCreamSandwich"
|
||||||
parent="MiniKeyboardPanelStyle.IceCreamSandwich"
|
parent="MoreKeysKeyboardPanelStyle.IceCreamSandwich"
|
||||||
>
|
>
|
||||||
</style>
|
</style>
|
||||||
<style name="MiniKeyboardAnimation">
|
<style name="MoreKeysKeyboardAnimation">
|
||||||
<item name="android:windowEnterAnimation">@anim/mini_keyboard_fadein</item>
|
<item name="android:windowEnterAnimation">@anim/more_keys_keyboard_fadein</item>
|
||||||
<item name="android:windowExitAnimation">@anim/mini_keyboard_fadeout</item>
|
<item name="android:windowExitAnimation">@anim/more_keys_keyboard_fadeout</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
<item name="keyboardStyle">@style/Keyboard.HighContrast</item>
|
<item name="keyboardStyle">@style/Keyboard.HighContrast</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.HighContrast</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.HighContrast</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.HighContrast</item>
|
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.HighContrast</item>
|
||||||
<item name="miniKeyboardStyle">@style/MiniKeyboard</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard</item>
|
||||||
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
|
||||||
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
||||||
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
||||||
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
<item name="keyboardStyle">@style/Keyboard</item>
|
<item name="keyboardStyle">@style/Keyboard</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView</item>
|
<item name="keyboardViewStyle">@style/KeyboardView</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView</item>
|
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView</item>
|
||||||
<item name="miniKeyboardStyle">@style/MiniKeyboard</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard</item>
|
||||||
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView</item>
|
||||||
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
||||||
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
||||||
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
<item name="keyboardStyle">@style/Keyboard.Gingerbread</item>
|
<item name="keyboardStyle">@style/Keyboard.Gingerbread</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.Gingerbread</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.Gingerbread</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Gingerbread</item>
|
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Gingerbread</item>
|
||||||
<item name="miniKeyboardStyle">@style/MiniKeyboard.Gingerbread</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Gingerbread</item>
|
||||||
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView.Gingerbread</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Gingerbread</item>
|
||||||
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
||||||
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
||||||
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
<item name="keyboardStyle">@style/Keyboard.IceCreamSandwich</item>
|
<item name="keyboardStyle">@style/Keyboard.IceCreamSandwich</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.IceCreamSandwich</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.IceCreamSandwich</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.IceCreamSandwich</item>
|
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.IceCreamSandwich</item>
|
||||||
<item name="miniKeyboardStyle">@style/MiniKeyboard.IceCreamSandwich</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.IceCreamSandwich</item>
|
||||||
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView.IceCreamSandwich</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.IceCreamSandwich</item>
|
||||||
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle.IceCreamSandwich</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle.IceCreamSandwich</item>
|
||||||
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle.IceCreamSandwich</item>
|
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle.IceCreamSandwich</item>
|
||||||
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle.IceCreamSandwich</item>
|
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle.IceCreamSandwich</item>
|
||||||
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle.IceCreamSandwich</item>
|
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle.IceCreamSandwich</item>
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
<item name="keyboardStyle">@style/Keyboard.Stone.Bold</item>
|
<item name="keyboardStyle">@style/Keyboard.Stone.Bold</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.Stone.Bold</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.Stone.Bold</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Stone.Bold</item>
|
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Stone.Bold</item>
|
||||||
<item name="miniKeyboardStyle">@style/MiniKeyboard.Stone</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Stone</item>
|
||||||
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView.Stone</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
|
||||||
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
||||||
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
||||||
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
<item name="keyboardStyle">@style/Keyboard.Stone</item>
|
<item name="keyboardStyle">@style/Keyboard.Stone</item>
|
||||||
<item name="keyboardViewStyle">@style/KeyboardView.Stone</item>
|
<item name="keyboardViewStyle">@style/KeyboardView.Stone</item>
|
||||||
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Stone</item>
|
<item name="latinKeyboardViewStyle">@style/LatinKeyboardView.Stone</item>
|
||||||
<item name="miniKeyboardStyle">@style/MiniKeyboard.Stone</item>
|
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.Stone</item>
|
||||||
<item name="miniKeyboardViewStyle">@style/MiniKeyboardView.Stone</item>
|
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.Stone</item>
|
||||||
<item name="miniKeyboardPanelStyle">@style/MiniKeyboardPanelStyle</item>
|
<item name="moreKeysKeyboardPanelStyle">@style/MoreKeysKeyboardPanelStyle</item>
|
||||||
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
<item name="suggestionsStripBackgroundStyle">@style/SuggestionsStripBackgroundStyle</item>
|
||||||
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
<item name="suggestionsViewStyle">@style/SuggestionsViewStyle</item>
|
||||||
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
<item name="moreSuggestionsViewStyle">@style/MoreSuggestionsViewStyle</item>
|
||||||
|
|
|
@ -21,6 +21,6 @@
|
||||||
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
latin:keyWidth="5%p"
|
latin:keyWidth="5%p"
|
||||||
latin:rowHeight="@dimen/popup_key_height"
|
latin:rowHeight="@dimen/popup_key_height"
|
||||||
style="?attr/miniKeyboardStyle"
|
style="?attr/moreKeysKeyboardStyle"
|
||||||
>
|
>
|
||||||
</Keyboard>
|
</Keyboard>
|
|
@ -21,6 +21,6 @@
|
||||||
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
latin:keyWidth="8%p"
|
latin:keyWidth="8%p"
|
||||||
latin:rowHeight="@dimen/popup_key_height"
|
latin:rowHeight="@dimen/popup_key_height"
|
||||||
style="?attr/miniKeyboardStyle"
|
style="?attr/moreKeysKeyboardStyle"
|
||||||
>
|
>
|
||||||
</Keyboard>
|
</Keyboard>
|
|
@ -21,6 +21,6 @@
|
||||||
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
latin:keyWidth="3.5%p"
|
latin:keyWidth="3.5%p"
|
||||||
latin:rowHeight="@dimen/popup_key_height"
|
latin:rowHeight="@dimen/popup_key_height"
|
||||||
style="?attr/miniKeyboardStyle"
|
style="?attr/moreKeysKeyboardStyle"
|
||||||
>
|
>
|
||||||
</Keyboard>
|
</Keyboard>
|
|
@ -21,6 +21,6 @@
|
||||||
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
latin:keyWidth="5.0%p"
|
latin:keyWidth="5.0%p"
|
||||||
latin:rowHeight="@dimen/popup_key_height"
|
latin:rowHeight="@dimen/popup_key_height"
|
||||||
style="?attr/miniKeyboardStyle"
|
style="?attr/moreKeysKeyboardStyle"
|
||||||
>
|
>
|
||||||
</Keyboard>
|
</Keyboard>
|
|
@ -21,6 +21,6 @@
|
||||||
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
latin:keyWidth="10%p"
|
latin:keyWidth="10%p"
|
||||||
latin:rowHeight="@dimen/popup_key_height"
|
latin:rowHeight="@dimen/popup_key_height"
|
||||||
style="?attr/miniKeyboardStyle"
|
style="?attr/moreKeysKeyboardStyle"
|
||||||
>
|
>
|
||||||
</Keyboard>
|
</Keyboard>
|
|
@ -278,6 +278,6 @@
|
||||||
latin:keyHintLabel="@string/keyhintlabel_for_punctuation"
|
latin:keyHintLabel="@string/keyhintlabel_for_punctuation"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
latin:moreKeys="@string/more_keys_for_punctuation"
|
latin:moreKeys="@string/more_keys_for_punctuation"
|
||||||
latin:maxMoreKeysColumn="@integer/mini_keyboard_column_for_punctuation"
|
latin:maxMoreKeysColumn="@integer/more_keys_keyboard_column_for_punctuation"
|
||||||
latin:backgroundType="functional" />
|
latin:backgroundType="functional" />
|
||||||
</merge>
|
</merge>
|
||||||
|
|
|
@ -245,7 +245,7 @@ public class Key {
|
||||||
mActionFlags = actionFlags;
|
mActionFlags = actionFlags;
|
||||||
mMoreKeys = moreKeys;
|
mMoreKeys = moreKeys;
|
||||||
mMaxMoreKeysColumn = style.getInt(keyAttr,
|
mMaxMoreKeysColumn = style.getInt(keyAttr,
|
||||||
R.styleable.Keyboard_Key_maxMoreKeysColumn, params.mMaxMiniKeyboardColumn);
|
R.styleable.Keyboard_Key_maxMoreKeysColumn, params.mMaxMoreKeysKeyboardColumn);
|
||||||
|
|
||||||
mLabel = adjustCaseOfStringForKeyboardId(style.getString(keyAttr,
|
mLabel = adjustCaseOfStringForKeyboardId(style.getString(keyAttr,
|
||||||
R.styleable.Keyboard_Key_keyLabel), preserveCase, params.mId);
|
R.styleable.Keyboard_Key_keyLabel), preserveCase, params.mId);
|
||||||
|
|
|
@ -121,8 +121,8 @@ public class Keyboard {
|
||||||
/** More keys keyboard template */
|
/** More keys keyboard template */
|
||||||
public final int mMoreKeysTemplate;
|
public final int mMoreKeysTemplate;
|
||||||
|
|
||||||
/** Maximum column for mini keyboard */
|
/** Maximum column for more keys keyboard */
|
||||||
public final int mMaxMiniKeyboardColumn;
|
public final int mMaxMoreKeysKeyboardColumn;
|
||||||
|
|
||||||
/** List of keys and icons in this keyboard */
|
/** List of keys and icons in this keyboard */
|
||||||
public final Set<Key> mKeys;
|
public final Set<Key> mKeys;
|
||||||
|
@ -143,7 +143,7 @@ public class Keyboard {
|
||||||
mMostCommonKeyHeight = params.mMostCommonKeyHeight;
|
mMostCommonKeyHeight = params.mMostCommonKeyHeight;
|
||||||
mMostCommonKeyWidth = params.mMostCommonKeyWidth;
|
mMostCommonKeyWidth = params.mMostCommonKeyWidth;
|
||||||
mMoreKeysTemplate = params.mMoreKeysTemplate;
|
mMoreKeysTemplate = params.mMoreKeysTemplate;
|
||||||
mMaxMiniKeyboardColumn = params.mMaxMiniKeyboardColumn;
|
mMaxMoreKeysKeyboardColumn = params.mMaxMoreKeysKeyboardColumn;
|
||||||
|
|
||||||
mTopPadding = params.mTopPadding;
|
mTopPadding = params.mTopPadding;
|
||||||
mVerticalGap = params.mVerticalGap;
|
mVerticalGap = params.mVerticalGap;
|
||||||
|
@ -226,7 +226,7 @@ public class Keyboard {
|
||||||
public int mVerticalGap;
|
public int mVerticalGap;
|
||||||
|
|
||||||
public int mMoreKeysTemplate;
|
public int mMoreKeysTemplate;
|
||||||
public int mMaxMiniKeyboardColumn;
|
public int mMaxMoreKeysKeyboardColumn;
|
||||||
|
|
||||||
public int GRID_WIDTH;
|
public int GRID_WIDTH;
|
||||||
public int GRID_HEIGHT;
|
public int GRID_HEIGHT;
|
||||||
|
@ -770,7 +770,7 @@ public class Keyboard {
|
||||||
|
|
||||||
params.mMoreKeysTemplate = keyboardAttr.getResourceId(
|
params.mMoreKeysTemplate = keyboardAttr.getResourceId(
|
||||||
R.styleable.Keyboard_moreKeysTemplate, 0);
|
R.styleable.Keyboard_moreKeysTemplate, 0);
|
||||||
params.mMaxMiniKeyboardColumn = keyAttr.getInt(
|
params.mMaxMoreKeysKeyboardColumn = keyAttr.getInt(
|
||||||
R.styleable.Keyboard_Key_maxMoreKeysColumn, 5);
|
R.styleable.Keyboard_Key_maxMoreKeysColumn, 5);
|
||||||
|
|
||||||
params.mIconsSet.loadIcons(keyboardAttr);
|
params.mIconsSet.loadIcons(keyboardAttr);
|
||||||
|
|
|
@ -92,13 +92,13 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
private final Drawable mAutoCorrectionSpacebarLedIcon;
|
private final Drawable mAutoCorrectionSpacebarLedIcon;
|
||||||
private static final int SPACE_LED_LENGTH_PERCENT = 80;
|
private static final int SPACE_LED_LENGTH_PERCENT = 80;
|
||||||
|
|
||||||
// Mini keyboard
|
// More keys keyboard
|
||||||
private PopupWindow mMoreKeysWindow;
|
private PopupWindow mMoreKeysWindow;
|
||||||
private MoreKeysPanel mMoreKeysPanel;
|
private MoreKeysPanel mMoreKeysPanel;
|
||||||
private int mMoreKeysPanelPointerTrackerId;
|
private int mMoreKeysPanelPointerTrackerId;
|
||||||
private final WeakHashMap<Key, MoreKeysPanel> mMoreKeysPanelCache =
|
private final WeakHashMap<Key, MoreKeysPanel> mMoreKeysPanelCache =
|
||||||
new WeakHashMap<Key, MoreKeysPanel>();
|
new WeakHashMap<Key, MoreKeysPanel>();
|
||||||
private final boolean mConfigShowMiniKeyboardAtTouchedPoint;
|
private final boolean mConfigShowMoreKeysKeyboardAtTouchedPoint;
|
||||||
|
|
||||||
private final PointerTrackerParams mPointerTrackerParams;
|
private final PointerTrackerParams mPointerTrackerParams;
|
||||||
private final boolean mIsSpacebarTriggeringPopupByLongPress;
|
private final boolean mIsSpacebarTriggeringPopupByLongPress;
|
||||||
|
@ -137,7 +137,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
break;
|
break;
|
||||||
case MSG_LONGPRESS_KEY:
|
case MSG_LONGPRESS_KEY:
|
||||||
if (tracker != null) {
|
if (tracker != null) {
|
||||||
keyboardView.openMiniKeyboardIfRequired(tracker.getKey(), tracker);
|
keyboardView.openMoreKeysKeyboardIfRequired(tracker.getKey(), tracker);
|
||||||
} else {
|
} else {
|
||||||
KeyboardSwitcher.getInstance().onLongPressTimeout(msg.arg1);
|
KeyboardSwitcher.getInstance().onLongPressTimeout(msg.arg1);
|
||||||
}
|
}
|
||||||
|
@ -338,8 +338,8 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
R.styleable.LatinKeyboardView_keyHysteresisDistance, 0);
|
R.styleable.LatinKeyboardView_keyHysteresisDistance, 0);
|
||||||
mKeyDetector = new KeyDetector(keyHysteresisDistance);
|
mKeyDetector = new KeyDetector(keyHysteresisDistance);
|
||||||
mKeyTimerHandler = new KeyTimerHandler(this, keyTimerParams);
|
mKeyTimerHandler = new KeyTimerHandler(this, keyTimerParams);
|
||||||
mConfigShowMiniKeyboardAtTouchedPoint = a.getBoolean(
|
mConfigShowMoreKeysKeyboardAtTouchedPoint = a.getBoolean(
|
||||||
R.styleable.LatinKeyboardView_showMiniKeyboardAtTouchedPoint, false);
|
R.styleable.LatinKeyboardView_showMoreKeysKeyboardAtTouchedPoint, false);
|
||||||
a.recycle();
|
a.recycle();
|
||||||
|
|
||||||
PointerTracker.setParameters(mPointerTrackerParams);
|
PointerTracker.setParameters(mPointerTrackerParams);
|
||||||
|
@ -435,7 +435,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
super.cancelAllMessages();
|
super.cancelAllMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean openMiniKeyboardIfRequired(Key parentKey, PointerTracker tracker) {
|
private boolean openMoreKeysKeyboardIfRequired(Key parentKey, PointerTracker tracker) {
|
||||||
// Check if we have a popup layout specified first.
|
// Check if we have a popup layout specified first.
|
||||||
if (mMoreKeysLayout == 0) {
|
if (mMoreKeysLayout == 0) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -458,19 +458,19 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
if (container == null)
|
if (container == null)
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
|
|
||||||
final MiniKeyboardView miniKeyboardView =
|
final MoreKeysKeyboardView moreKeysKeyboardView =
|
||||||
(MiniKeyboardView)container.findViewById(R.id.mini_keyboard_view);
|
(MoreKeysKeyboardView)container.findViewById(R.id.more_keys_keyboard_view);
|
||||||
final Keyboard parentKeyboard = getKeyboard();
|
final Keyboard parentKeyboard = getKeyboard();
|
||||||
final Keyboard miniKeyboard = new MiniKeyboard.Builder(
|
final Keyboard moreKeysKeyboard = new MoreKeysKeyboard.Builder(
|
||||||
this, parentKeyboard.mMoreKeysTemplate, parentKey, parentKeyboard).build();
|
this, parentKeyboard.mMoreKeysTemplate, parentKey, parentKeyboard).build();
|
||||||
miniKeyboardView.setKeyboard(miniKeyboard);
|
moreKeysKeyboardView.setKeyboard(moreKeysKeyboard);
|
||||||
container.measure(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
container.measure(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
|
|
||||||
return miniKeyboardView;
|
return moreKeysKeyboardView;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a key is long pressed. By default this will open mini keyboard associated
|
* Called when a key is long pressed. By default this will open more keys keyboard associated
|
||||||
* with this key.
|
* with this key.
|
||||||
* @param parentKey the key that was long pressed
|
* @param parentKey the key that was long pressed
|
||||||
* @param tracker the pointer tracker which pressed the parent key
|
* @param tracker the pointer tracker which pressed the parent key
|
||||||
|
@ -524,13 +524,13 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
if (mMoreKeysWindow == null) {
|
if (mMoreKeysWindow == null) {
|
||||||
mMoreKeysWindow = new PopupWindow(getContext());
|
mMoreKeysWindow = new PopupWindow(getContext());
|
||||||
mMoreKeysWindow.setBackgroundDrawable(null);
|
mMoreKeysWindow.setBackgroundDrawable(null);
|
||||||
mMoreKeysWindow.setAnimationStyle(R.style.MiniKeyboardAnimation);
|
mMoreKeysWindow.setAnimationStyle(R.style.MoreKeysKeyboardAnimation);
|
||||||
}
|
}
|
||||||
mMoreKeysPanel = moreKeysPanel;
|
mMoreKeysPanel = moreKeysPanel;
|
||||||
mMoreKeysPanelPointerTrackerId = tracker.mPointerId;
|
mMoreKeysPanelPointerTrackerId = tracker.mPointerId;
|
||||||
|
|
||||||
final Keyboard keyboard = getKeyboard();
|
final Keyboard keyboard = getKeyboard();
|
||||||
final int pointX = (mConfigShowMiniKeyboardAtTouchedPoint) ? tracker.getLastX()
|
final int pointX = (mConfigShowMoreKeysKeyboardAtTouchedPoint) ? tracker.getLastX()
|
||||||
: parentKey.mX + parentKey.mWidth / 2;
|
: parentKey.mX + parentKey.mWidth / 2;
|
||||||
final int pointY = parentKey.mY - keyboard.mVerticalGap;
|
final int pointY = parentKey.mY - keyboard.mVerticalGap;
|
||||||
moreKeysPanel.showMoreKeysPanel(
|
moreKeysPanel.showMoreKeysPanel(
|
||||||
|
|
|
@ -21,10 +21,10 @@ import android.graphics.Paint;
|
||||||
import com.android.inputmethod.keyboard.internal.KeySpecParser;
|
import com.android.inputmethod.keyboard.internal.KeySpecParser;
|
||||||
import com.android.inputmethod.latin.R;
|
import com.android.inputmethod.latin.R;
|
||||||
|
|
||||||
public class MiniKeyboard extends Keyboard {
|
public class MoreKeysKeyboard extends Keyboard {
|
||||||
private final int mDefaultKeyCoordX;
|
private final int mDefaultKeyCoordX;
|
||||||
|
|
||||||
private MiniKeyboard(Builder.MiniKeyboardParams params) {
|
private MoreKeysKeyboard(Builder.MoreKeysKeyboardParams params) {
|
||||||
super(params);
|
super(params);
|
||||||
mDefaultKeyCoordX = params.getDefaultKeyCoordX() + params.mDefaultKeyWidth / 2;
|
mDefaultKeyCoordX = params.getDefaultKeyCoordX() + params.mDefaultKeyWidth / 2;
|
||||||
}
|
}
|
||||||
|
@ -33,21 +33,21 @@ public class MiniKeyboard extends Keyboard {
|
||||||
return mDefaultKeyCoordX;
|
return mDefaultKeyCoordX;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Builder extends Keyboard.Builder<Builder.MiniKeyboardParams> {
|
public static class Builder extends Keyboard.Builder<Builder.MoreKeysKeyboardParams> {
|
||||||
private final String[] mMoreKeys;
|
private final String[] mMoreKeys;
|
||||||
|
|
||||||
public static class MiniKeyboardParams extends Keyboard.Params {
|
public static class MoreKeysKeyboardParams extends Keyboard.Params {
|
||||||
/* package */int mTopRowAdjustment;
|
/* package */int mTopRowAdjustment;
|
||||||
public int mNumRows;
|
public int mNumRows;
|
||||||
public int mNumColumns;
|
public int mNumColumns;
|
||||||
public int mLeftKeys;
|
public int mLeftKeys;
|
||||||
public int mRightKeys; // includes default key.
|
public int mRightKeys; // includes default key.
|
||||||
|
|
||||||
public MiniKeyboardParams() {
|
public MoreKeysKeyboardParams() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* package for test */MiniKeyboardParams(int numKeys, int maxColumns, int keyWidth,
|
/* package for test */MoreKeysKeyboardParams(int numKeys, int maxColumns, int keyWidth,
|
||||||
int rowHeight, int coordXInParent, int parentKeyboardWidth) {
|
int rowHeight, int coordXInParent, int parentKeyboardWidth) {
|
||||||
super();
|
super();
|
||||||
setParameters(numKeys, maxColumns, keyWidth, rowHeight, coordXInParent,
|
setParameters(numKeys, maxColumns, keyWidth, rowHeight, coordXInParent,
|
||||||
|
@ -55,21 +55,21 @@ public class MiniKeyboard extends Keyboard {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set keyboard parameters of mini keyboard.
|
* Set keyboard parameters of more keys keyboard.
|
||||||
*
|
*
|
||||||
* @param numKeys number of keys in this mini keyboard.
|
* @param numKeys number of keys in this more keys keyboard.
|
||||||
* @param maxColumns number of maximum columns of this mini keyboard.
|
* @param maxColumns number of maximum columns of this more keys keyboard.
|
||||||
* @param keyWidth mini keyboard key width in pixel, including horizontal gap.
|
* @param keyWidth more keys keyboard key width in pixel, including horizontal gap.
|
||||||
* @param rowHeight mini keyboard row height in pixel, including vertical gap.
|
* @param rowHeight more keys keyboard row height in pixel, including vertical gap.
|
||||||
* @param coordXInParent coordinate x of the popup key in parent keyboard.
|
* @param coordXInParent coordinate x of the key preview in parent keyboard.
|
||||||
* @param parentKeyboardWidth parent keyboard width in pixel.
|
* @param parentKeyboardWidth parent keyboard width in pixel.
|
||||||
*/
|
*/
|
||||||
public void setParameters(int numKeys, int maxColumns, int keyWidth, int rowHeight,
|
public void setParameters(int numKeys, int maxColumns, int keyWidth, int rowHeight,
|
||||||
int coordXInParent, int parentKeyboardWidth) {
|
int coordXInParent, int parentKeyboardWidth) {
|
||||||
if (parentKeyboardWidth / keyWidth < maxColumns) {
|
if (parentKeyboardWidth / keyWidth < maxColumns) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Keyboard is too small to hold mini keyboard: " + parentKeyboardWidth
|
"Keyboard is too small to hold more keys keyboard: "
|
||||||
+ " " + keyWidth + " " + maxColumns);
|
+ parentKeyboardWidth + " " + keyWidth + " " + maxColumns);
|
||||||
}
|
}
|
||||||
mDefaultKeyWidth = keyWidth;
|
mDefaultKeyWidth = keyWidth;
|
||||||
mDefaultRowHeight = rowHeight;
|
mDefaultRowHeight = rowHeight;
|
||||||
|
@ -95,14 +95,14 @@ public class MiniKeyboard extends Keyboard {
|
||||||
leftKeys = numLeftKeys;
|
leftKeys = numLeftKeys;
|
||||||
rightKeys = numRightKeys;
|
rightKeys = numRightKeys;
|
||||||
}
|
}
|
||||||
// Shift right if the left edge of mini keyboard is on the edge of parent keyboard
|
// Shift right if the left edge of more keys keyboard is on the edge of parent
|
||||||
// unless the parent key is on the left edge.
|
// keyboard unless the parent key is on the left edge.
|
||||||
if (leftKeys * keyWidth >= coordXInParent && leftKeys > 0) {
|
if (leftKeys * keyWidth >= coordXInParent && leftKeys > 0) {
|
||||||
leftKeys--;
|
leftKeys--;
|
||||||
rightKeys++;
|
rightKeys++;
|
||||||
}
|
}
|
||||||
// Shift left if the right edge of mini keyboard is on the edge of parent keyboard
|
// Shift left if the right edge of more keys keyboard is on the edge of parent
|
||||||
// unless the parent key is on the right edge.
|
// keyboard unless the parent key is on the right edge.
|
||||||
if (rightKeys * keyWidth + coordXInParent >= parentKeyboardWidth && rightKeys > 1) {
|
if (rightKeys * keyWidth + coordXInParent >= parentKeyboardWidth && rightKeys > 1) {
|
||||||
leftKeys++;
|
leftKeys++;
|
||||||
rightKeys--;
|
rightKeys--;
|
||||||
|
@ -204,10 +204,10 @@ public class MiniKeyboard extends Keyboard {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder(KeyboardView view, int xmlId, Key parentKey, Keyboard parentKeyboard) {
|
public Builder(KeyboardView view, int xmlId, Key parentKey, Keyboard parentKeyboard) {
|
||||||
super(view.getContext(), new MiniKeyboardParams());
|
super(view.getContext(), new MoreKeysKeyboardParams());
|
||||||
load(xmlId, parentKeyboard.mId);
|
load(xmlId, parentKeyboard.mId);
|
||||||
|
|
||||||
// TODO: Mini keyboard's vertical gap is currently calculated heuristically.
|
// TODO: More keys keyboard's vertical gap is currently calculated heuristically.
|
||||||
// Should revise the algorithm.
|
// Should revise the algorithm.
|
||||||
mParams.mVerticalGap = parentKeyboard.mVerticalGap / 2;
|
mParams.mVerticalGap = parentKeyboard.mVerticalGap / 2;
|
||||||
mMoreKeys = parentKey.mMoreKeys;
|
mMoreKeys = parentKey.mMoreKeys;
|
||||||
|
@ -215,8 +215,9 @@ public class MiniKeyboard extends Keyboard {
|
||||||
final int previewWidth = view.mKeyPreviewDrawParams.mPreviewBackgroundWidth;
|
final int previewWidth = view.mKeyPreviewDrawParams.mPreviewBackgroundWidth;
|
||||||
final int previewHeight = view.mKeyPreviewDrawParams.mPreviewBackgroundHeight;
|
final int previewHeight = view.mKeyPreviewDrawParams.mPreviewBackgroundHeight;
|
||||||
final int width, height;
|
final int width, height;
|
||||||
// Use pre-computed width and height if these values are available and mini keyboard
|
// Use pre-computed width and height if these values are available and more keys
|
||||||
// has only one key to mitigate visual flicker between key preview and mini keyboard.
|
// keyboard has only one key to mitigate visual flicker between key preview and more
|
||||||
|
// keys keyboard.
|
||||||
if (view.isKeyPreviewPopupEnabled() && mMoreKeys.length == 1 && previewWidth > 0
|
if (view.isKeyPreviewPopupEnabled() && mMoreKeys.length == 1 && previewWidth > 0
|
||||||
&& previewHeight > 0) {
|
&& previewHeight > 0) {
|
||||||
width = previewWidth;
|
width = previewWidth;
|
||||||
|
@ -231,7 +232,7 @@ public class MiniKeyboard extends Keyboard {
|
||||||
|
|
||||||
private static int getMaxKeyWidth(KeyboardView view, String[] moreKeys, int minKeyWidth) {
|
private static int getMaxKeyWidth(KeyboardView view, String[] moreKeys, int minKeyWidth) {
|
||||||
final int padding = (int) view.getContext().getResources()
|
final int padding = (int) view.getContext().getResources()
|
||||||
.getDimension(R.dimen.mini_keyboard_key_horizontal_padding);
|
.getDimension(R.dimen.more_keys_keyboard_key_horizontal_padding);
|
||||||
Paint paint = null;
|
Paint paint = null;
|
||||||
int maxWidth = minKeyWidth;
|
int maxWidth = minKeyWidth;
|
||||||
for (String moreKeySpec : moreKeys) {
|
for (String moreKeySpec : moreKeys) {
|
||||||
|
@ -252,8 +253,8 @@ public class MiniKeyboard extends Keyboard {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MiniKeyboard build() {
|
public MoreKeysKeyboard build() {
|
||||||
final MiniKeyboardParams params = mParams;
|
final MoreKeysKeyboardParams params = mParams;
|
||||||
for (int n = 0; n < mMoreKeys.length; n++) {
|
for (int n = 0; n < mMoreKeys.length; n++) {
|
||||||
final String moreKeySpec = mMoreKeys[n];
|
final String moreKeySpec = mMoreKeys[n];
|
||||||
final int row = n / params.mNumColumns;
|
final int row = n / params.mNumColumns;
|
||||||
|
@ -262,7 +263,7 @@ public class MiniKeyboard extends Keyboard {
|
||||||
params.markAsEdgeKey(key, row);
|
params.markAsEdgeKey(key, row);
|
||||||
params.onAddKey(key);
|
params.onAddKey(key);
|
||||||
}
|
}
|
||||||
return new MiniKeyboard(params);
|
return new MoreKeysKeyboard(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -28,10 +28,10 @@ import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
|
||||||
import com.android.inputmethod.latin.R;
|
import com.android.inputmethod.latin.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A view that renders a virtual {@link MiniKeyboard}. It handles rendering of keys and detecting
|
* A view that renders a virtual {@link MoreKeysKeyboard}. It handles rendering of keys and
|
||||||
* key presses and touch movements.
|
* detecting key presses and touch movements.
|
||||||
*/
|
*/
|
||||||
public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
|
public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel {
|
||||||
private final int[] mCoordinates = new int[2];
|
private final int[] mCoordinates = new int[2];
|
||||||
|
|
||||||
private final KeyDetector mKeyDetector;
|
private final KeyDetector mKeyDetector;
|
||||||
|
@ -43,7 +43,7 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
|
||||||
|
|
||||||
private static final TimerProxy EMPTY_TIMER_PROXY = new TimerProxy.Adapter();
|
private static final TimerProxy EMPTY_TIMER_PROXY = new TimerProxy.Adapter();
|
||||||
|
|
||||||
private final KeyboardActionListener mMiniKeyboardListener =
|
private final KeyboardActionListener mMoreKeysKeyboardListener =
|
||||||
new KeyboardActionListener.Adapter() {
|
new KeyboardActionListener.Adapter() {
|
||||||
@Override
|
@Override
|
||||||
public void onCodeInput(int primaryCode, int[] keyCodes, int x, int y) {
|
public void onCodeInput(int primaryCode, int[] keyCodes, int x, int y) {
|
||||||
|
@ -71,16 +71,16 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public MiniKeyboardView(Context context, AttributeSet attrs) {
|
public MoreKeysKeyboardView(Context context, AttributeSet attrs) {
|
||||||
this(context, attrs, R.attr.miniKeyboardViewStyle);
|
this(context, attrs, R.attr.moreKeysKeyboardViewStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MiniKeyboardView(Context context, AttributeSet attrs, int defStyle) {
|
public MoreKeysKeyboardView(Context context, AttributeSet attrs, int defStyle) {
|
||||||
super(context, attrs, defStyle);
|
super(context, attrs, defStyle);
|
||||||
|
|
||||||
final Resources res = context.getResources();
|
final Resources res = context.getResources();
|
||||||
mKeyDetector = new MoreKeysDetector(
|
mKeyDetector = new MoreKeysDetector(
|
||||||
res.getDimension(R.dimen.mini_keyboard_slide_allowance));
|
res.getDimension(R.dimen.more_keys_keyboard_slide_allowance));
|
||||||
setKeyPreviewPopupEnabled(false, 0);
|
setKeyPreviewPopupEnabled(false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public KeyboardActionListener getKeyboardActionListener() {
|
public KeyboardActionListener getKeyboardActionListener() {
|
||||||
return mMiniKeyboardListener;
|
return mMoreKeysKeyboardListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -125,7 +125,7 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setKeyPreviewPopupEnabled(boolean previewEnabled, int delay) {
|
public void setKeyPreviewPopupEnabled(boolean previewEnabled, int delay) {
|
||||||
// Mini keyboard needs no pop-up key preview displayed, so we pass always false with a
|
// More keys keyboard needs no pop-up key preview displayed, so we pass always false with a
|
||||||
// delay of 0. The delay does not matter actually since the popup is not shown anyway.
|
// delay of 0. The delay does not matter actually since the popup is not shown anyway.
|
||||||
super.setKeyPreviewPopupEnabled(false, 0);
|
super.setKeyPreviewPopupEnabled(false, 0);
|
||||||
}
|
}
|
||||||
|
@ -136,13 +136,13 @@ public class MiniKeyboardView extends KeyboardView implements MoreKeysPanel {
|
||||||
mController = controller;
|
mController = controller;
|
||||||
mListener = listener;
|
mListener = listener;
|
||||||
final View container = (View)getParent();
|
final View container = (View)getParent();
|
||||||
final MiniKeyboard miniKeyboard = (MiniKeyboard)getKeyboard();
|
final MoreKeysKeyboard moreKeysKeyboard = (MoreKeysKeyboard)getKeyboard();
|
||||||
|
|
||||||
parentView.getLocationInWindow(mCoordinates);
|
parentView.getLocationInWindow(mCoordinates);
|
||||||
final int miniKeyboardLeft = pointX - miniKeyboard.getDefaultCoordX()
|
final int moreKeysKeyboardLeft = pointX - moreKeysKeyboard.getDefaultCoordX()
|
||||||
+ parentView.getPaddingLeft();
|
+ parentView.getPaddingLeft();
|
||||||
final int x = wrapUp(Math.max(0, Math.min(miniKeyboardLeft,
|
final int x = wrapUp(Math.max(0, Math.min(moreKeysKeyboardLeft,
|
||||||
parentView.getWidth() - miniKeyboard.mOccupiedWidth))
|
parentView.getWidth() - moreKeysKeyboard.mOccupiedWidth))
|
||||||
- container.getPaddingLeft() + mCoordinates[0],
|
- container.getPaddingLeft() + mCoordinates[0],
|
||||||
container.getMeasuredWidth(), 0, parentView.getWidth());
|
container.getMeasuredWidth(), 0, parentView.getWidth());
|
||||||
final int y = pointY
|
final int y = pointY
|
|
@ -59,7 +59,7 @@ public class ProximityInfo {
|
||||||
mKeyHeight = keyHeight;
|
mKeyHeight = keyHeight;
|
||||||
mGridNeighbors = new Key[mGridSize][];
|
mGridNeighbors = new Key[mGridSize][];
|
||||||
if (minWidth == 0 || height == 0) {
|
if (minWidth == 0 || height == 0) {
|
||||||
// No proximity required. Keyboard might be mini keyboard.
|
// No proximity required. Keyboard might be more keys keyboard.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
computeNearestNeighbors(keyWidth, keys, touchPositionCorrection, additionalProximityChars);
|
computeNearestNeighbors(keyWidth, keys, touchPositionCorrection, additionalProximityChars);
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
|
|
||||||
package com.android.inputmethod.keyboard;
|
package com.android.inputmethod.keyboard;
|
||||||
|
|
||||||
import com.android.inputmethod.keyboard.MiniKeyboard.Builder.MiniKeyboardParams;
|
|
||||||
|
|
||||||
import android.test.AndroidTestCase;
|
import android.test.AndroidTestCase;
|
||||||
|
|
||||||
public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
import com.android.inputmethod.keyboard.MoreKeysKeyboard.Builder.MoreKeysKeyboardParams;
|
||||||
|
|
||||||
|
public class MoreKeysKeyboardBuilderTests extends AndroidTestCase {
|
||||||
private static final int MAX_COLUMNS = 5;
|
private static final int MAX_COLUMNS = 5;
|
||||||
private static final int WIDTH = 10;
|
private static final int WIDTH = 10;
|
||||||
private static final int HEIGHT = 10;
|
private static final int HEIGHT = 10;
|
||||||
|
@ -41,24 +41,24 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLayoutError() {
|
public void testLayoutError() {
|
||||||
MiniKeyboardParams params = null;
|
MoreKeysKeyboardParams params = null;
|
||||||
try {
|
try {
|
||||||
params = new MiniKeyboardParams(10, MAX_COLUMNS + 1, WIDTH, HEIGHT, WIDTH * 2,
|
params = new MoreKeysKeyboardParams(10, MAX_COLUMNS + 1, WIDTH, HEIGHT, WIDTH * 2,
|
||||||
WIDTH * MAX_COLUMNS);
|
WIDTH * MAX_COLUMNS);
|
||||||
fail("Should throw IllegalArgumentException");
|
fail("Should throw IllegalArgumentException");
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
// Too small keyboard to hold mini keyboard.
|
// Too small keyboard to hold more keys keyboard.
|
||||||
}
|
}
|
||||||
assertNull("Too small keyboard to hold mini keyboard", params);
|
assertNull("Too small keyboard to hold more keys keyboard", params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mini keyboard layout test.
|
// More keys keyboard layout test.
|
||||||
// "[n]" represents n-th key position in mini keyboard.
|
// "[n]" represents n-th key position in more keys keyboard.
|
||||||
// "[1]" is the default key.
|
// "[1]" is the default key.
|
||||||
|
|
||||||
// [1]
|
// [1]
|
||||||
public void testLayout1KeyM0() {
|
public void testLayout1KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("1 key M0 columns", 1, params.mNumColumns);
|
assertEquals("1 key M0 columns", 1, params.mNumColumns);
|
||||||
assertEquals("1 key M0 rows", 1, params.mNumRows);
|
assertEquals("1 key M0 rows", 1, params.mNumRows);
|
||||||
|
@ -71,7 +71,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |[1]
|
// |[1]
|
||||||
public void testLayout1KeyL0() {
|
public void testLayout1KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("1 key L0 columns", 1, params.mNumColumns);
|
assertEquals("1 key L0 columns", 1, params.mNumColumns);
|
||||||
assertEquals("1 key L0 rows", 1, params.mNumRows);
|
assertEquals("1 key L0 rows", 1, params.mNumRows);
|
||||||
|
@ -84,7 +84,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ [1]
|
// |___ [1]
|
||||||
public void testLayout1KeyL1() {
|
public void testLayout1KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("1 key L1 columns", 1, params.mNumColumns);
|
assertEquals("1 key L1 columns", 1, params.mNumColumns);
|
||||||
assertEquals("1 key L1 rows", 1, params.mNumRows);
|
assertEquals("1 key L1 rows", 1, params.mNumRows);
|
||||||
|
@ -97,7 +97,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ ___ [1]
|
// |___ ___ [1]
|
||||||
public void testLayout1KeyL2() {
|
public void testLayout1KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("1 key L2 columns", 1, params.mNumColumns);
|
assertEquals("1 key L2 columns", 1, params.mNumColumns);
|
||||||
assertEquals("1 key L2 rows", 1, params.mNumRows);
|
assertEquals("1 key L2 rows", 1, params.mNumRows);
|
||||||
|
@ -110,7 +110,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [1]|
|
// [1]|
|
||||||
public void testLayout1KeyR0() {
|
public void testLayout1KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("1 key R0 columns", 1, params.mNumColumns);
|
assertEquals("1 key R0 columns", 1, params.mNumColumns);
|
||||||
assertEquals("1 key R0 rows", 1, params.mNumRows);
|
assertEquals("1 key R0 rows", 1, params.mNumRows);
|
||||||
|
@ -123,7 +123,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [1] ___|
|
// [1] ___|
|
||||||
public void testLayout1KeyR1() {
|
public void testLayout1KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("1 key R1 columns", 1, params.mNumColumns);
|
assertEquals("1 key R1 columns", 1, params.mNumColumns);
|
||||||
assertEquals("1 key R1 rows", 1, params.mNumRows);
|
assertEquals("1 key R1 rows", 1, params.mNumRows);
|
||||||
|
@ -136,7 +136,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [1] ___ ___|
|
// [1] ___ ___|
|
||||||
public void testLayout1KeyR2() {
|
public void testLayout1KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(1, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("1 key R2 columns", 1, params.mNumColumns);
|
assertEquals("1 key R2 columns", 1, params.mNumColumns);
|
||||||
assertEquals("1 key R2 rows", 1, params.mNumRows);
|
assertEquals("1 key R2 rows", 1, params.mNumRows);
|
||||||
|
@ -149,7 +149,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [1] [2]
|
// [1] [2]
|
||||||
public void testLayout2KeyM0() {
|
public void testLayout2KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("2 key M0 columns", 2, params.mNumColumns);
|
assertEquals("2 key M0 columns", 2, params.mNumColumns);
|
||||||
assertEquals("2 key M0 rows", 1, params.mNumRows);
|
assertEquals("2 key M0 rows", 1, params.mNumRows);
|
||||||
|
@ -163,7 +163,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |[1] [2]
|
// |[1] [2]
|
||||||
public void testLayout2KeyL0() {
|
public void testLayout2KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("2 key L0 columns", 2, params.mNumColumns);
|
assertEquals("2 key L0 columns", 2, params.mNumColumns);
|
||||||
assertEquals("2 key L0 rows", 1, params.mNumRows);
|
assertEquals("2 key L0 rows", 1, params.mNumRows);
|
||||||
|
@ -177,7 +177,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ [1] [2]
|
// |___ [1] [2]
|
||||||
public void testLayout2KeyL1() {
|
public void testLayout2KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("2 key L1 columns", 2, params.mNumColumns);
|
assertEquals("2 key L1 columns", 2, params.mNumColumns);
|
||||||
assertEquals("2 key L1 rows", 1, params.mNumRows);
|
assertEquals("2 key L1 rows", 1, params.mNumRows);
|
||||||
|
@ -191,7 +191,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ ___ [1] [2]
|
// |___ ___ [1] [2]
|
||||||
public void testLayout2KeyL2() {
|
public void testLayout2KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("2 key L2 columns", 2, params.mNumColumns);
|
assertEquals("2 key L2 columns", 2, params.mNumColumns);
|
||||||
assertEquals("2 key L2 rows", 1, params.mNumRows);
|
assertEquals("2 key L2 rows", 1, params.mNumRows);
|
||||||
|
@ -205,7 +205,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [2] [1]|
|
// [2] [1]|
|
||||||
public void testLayout2KeyR0() {
|
public void testLayout2KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("2 key R0 columns", 2, params.mNumColumns);
|
assertEquals("2 key R0 columns", 2, params.mNumColumns);
|
||||||
assertEquals("2 key R0 rows", 1, params.mNumRows);
|
assertEquals("2 key R0 rows", 1, params.mNumRows);
|
||||||
|
@ -219,7 +219,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [2] [1] ___|
|
// [2] [1] ___|
|
||||||
public void testLayout2KeyR1() {
|
public void testLayout2KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("2 key R1 columns", 2, params.mNumColumns);
|
assertEquals("2 key R1 columns", 2, params.mNumColumns);
|
||||||
assertEquals("2 key R1 rows", 1, params.mNumRows);
|
assertEquals("2 key R1 rows", 1, params.mNumRows);
|
||||||
|
@ -233,7 +233,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [1] [2] ___ ___|
|
// [1] [2] ___ ___|
|
||||||
public void testLayout2KeyR2() {
|
public void testLayout2KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(2, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("2 key R2 columns", 2, params.mNumColumns);
|
assertEquals("2 key R2 columns", 2, params.mNumColumns);
|
||||||
assertEquals("2 key R2 rows", 1, params.mNumRows);
|
assertEquals("2 key R2 rows", 1, params.mNumRows);
|
||||||
|
@ -247,7 +247,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [3] [1] [2]
|
// [3] [1] [2]
|
||||||
public void testLayout3KeyM0() {
|
public void testLayout3KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("3 key columns", 3, params.mNumColumns);
|
assertEquals("3 key columns", 3, params.mNumColumns);
|
||||||
assertEquals("3 key rows", 1, params.mNumRows);
|
assertEquals("3 key rows", 1, params.mNumRows);
|
||||||
|
@ -262,7 +262,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |[1] [2] [3]
|
// |[1] [2] [3]
|
||||||
public void testLayout3KeyL0() {
|
public void testLayout3KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("3 key L0 columns", 3, params.mNumColumns);
|
assertEquals("3 key L0 columns", 3, params.mNumColumns);
|
||||||
assertEquals("3 key L0 rows", 1, params.mNumRows);
|
assertEquals("3 key L0 rows", 1, params.mNumRows);
|
||||||
|
@ -277,7 +277,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ [1] [2] [3]
|
// |___ [1] [2] [3]
|
||||||
public void testLayout3KeyL1() {
|
public void testLayout3KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("3 key L1 columns", 3, params.mNumColumns);
|
assertEquals("3 key L1 columns", 3, params.mNumColumns);
|
||||||
assertEquals("3 key L1 rows", 1, params.mNumRows);
|
assertEquals("3 key L1 rows", 1, params.mNumRows);
|
||||||
|
@ -292,7 +292,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ ___ [3] [1] [2]
|
// |___ ___ [3] [1] [2]
|
||||||
public void testLayout3KeyL2() {
|
public void testLayout3KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("3 key L2 columns", 3, params.mNumColumns);
|
assertEquals("3 key L2 columns", 3, params.mNumColumns);
|
||||||
assertEquals("3 key L2 rows", 1, params.mNumRows);
|
assertEquals("3 key L2 rows", 1, params.mNumRows);
|
||||||
|
@ -307,7 +307,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [3] [2] [1]|
|
// [3] [2] [1]|
|
||||||
public void testLayout3KeyR0() {
|
public void testLayout3KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("3 key R0 columns", 3, params.mNumColumns);
|
assertEquals("3 key R0 columns", 3, params.mNumColumns);
|
||||||
assertEquals("3 key R0 rows", 1, params.mNumRows);
|
assertEquals("3 key R0 rows", 1, params.mNumRows);
|
||||||
|
@ -322,7 +322,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [3] [2] [1] ___|
|
// [3] [2] [1] ___|
|
||||||
public void testLayout3KeyR1() {
|
public void testLayout3KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("3 key R1 columns", 3, params.mNumColumns);
|
assertEquals("3 key R1 columns", 3, params.mNumColumns);
|
||||||
assertEquals("3 key R1 rows", 1, params.mNumRows);
|
assertEquals("3 key R1 rows", 1, params.mNumRows);
|
||||||
|
@ -337,7 +337,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [3] [1] [2] ___ ___|
|
// [3] [1] [2] ___ ___|
|
||||||
public void testLayout3KeyR2() {
|
public void testLayout3KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(3, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("3 key R2 columns", 3, params.mNumColumns);
|
assertEquals("3 key R2 columns", 3, params.mNumColumns);
|
||||||
assertEquals("3 key R2 rows", 1, params.mNumRows);
|
assertEquals("3 key R2 rows", 1, params.mNumRows);
|
||||||
|
@ -352,7 +352,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [3] [1] [2] [4]
|
// [3] [1] [2] [4]
|
||||||
public void testLayout4KeyM0() {
|
public void testLayout4KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("4 key columns", 4, params.mNumColumns);
|
assertEquals("4 key columns", 4, params.mNumColumns);
|
||||||
assertEquals("4 key rows", 1, params.mNumRows);
|
assertEquals("4 key rows", 1, params.mNumRows);
|
||||||
|
@ -368,7 +368,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |[1] [2] [3] [4]
|
// |[1] [2] [3] [4]
|
||||||
public void testLayout4KeyL0() {
|
public void testLayout4KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("4 key L0 columns", 4, params.mNumColumns);
|
assertEquals("4 key L0 columns", 4, params.mNumColumns);
|
||||||
assertEquals("4 key L0 rows", 1, params.mNumRows);
|
assertEquals("4 key L0 rows", 1, params.mNumRows);
|
||||||
|
@ -384,7 +384,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ [1] [2] [3] [4]
|
// |___ [1] [2] [3] [4]
|
||||||
public void testLayout4KeyL1() {
|
public void testLayout4KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("4 key L1 columns", 4, params.mNumColumns);
|
assertEquals("4 key L1 columns", 4, params.mNumColumns);
|
||||||
assertEquals("4 key L1 rows", 1, params.mNumRows);
|
assertEquals("4 key L1 rows", 1, params.mNumRows);
|
||||||
|
@ -400,7 +400,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ ___ [3] [1] [2] [4]
|
// |___ ___ [3] [1] [2] [4]
|
||||||
public void testLayout4KeyL2() {
|
public void testLayout4KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("4 key L2 columns", 4, params.mNumColumns);
|
assertEquals("4 key L2 columns", 4, params.mNumColumns);
|
||||||
assertEquals("4 key L2 rows", 1, params.mNumRows);
|
assertEquals("4 key L2 rows", 1, params.mNumRows);
|
||||||
|
@ -416,7 +416,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [4] [3] [2] [1]|
|
// [4] [3] [2] [1]|
|
||||||
public void testLayout4KeyR0() {
|
public void testLayout4KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("4 key R0 columns", 4, params.mNumColumns);
|
assertEquals("4 key R0 columns", 4, params.mNumColumns);
|
||||||
assertEquals("4 key R0 rows", 1, params.mNumRows);
|
assertEquals("4 key R0 rows", 1, params.mNumRows);
|
||||||
|
@ -432,7 +432,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [4] [3] [2] [1] ___|
|
// [4] [3] [2] [1] ___|
|
||||||
public void testLayout4KeyR1() {
|
public void testLayout4KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("4 key R1 columns", 4, params.mNumColumns);
|
assertEquals("4 key R1 columns", 4, params.mNumColumns);
|
||||||
assertEquals("4 key R1 rows", 1, params.mNumRows);
|
assertEquals("4 key R1 rows", 1, params.mNumRows);
|
||||||
|
@ -448,7 +448,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [4] [3] [1] [2] ___ ___|
|
// [4] [3] [1] [2] ___ ___|
|
||||||
public void testLayout4KeyR2() {
|
public void testLayout4KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(4, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("4 key R2 columns", 4, params.mNumColumns);
|
assertEquals("4 key R2 columns", 4, params.mNumColumns);
|
||||||
assertEquals("4 key R2 rows", 1, params.mNumRows);
|
assertEquals("4 key R2 rows", 1, params.mNumRows);
|
||||||
|
@ -464,7 +464,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [5] [3] [1] [2] [4]
|
// [5] [3] [1] [2] [4]
|
||||||
public void testLayout5KeyM0() {
|
public void testLayout5KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("5 key columns", 5, params.mNumColumns);
|
assertEquals("5 key columns", 5, params.mNumColumns);
|
||||||
assertEquals("5 key rows", 1, params.mNumRows);
|
assertEquals("5 key rows", 1, params.mNumRows);
|
||||||
|
@ -481,7 +481,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |[1] [2] [3] [4] [5]
|
// |[1] [2] [3] [4] [5]
|
||||||
public void testLayout5KeyL0() {
|
public void testLayout5KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("5 key L0 columns", 5, params.mNumColumns);
|
assertEquals("5 key L0 columns", 5, params.mNumColumns);
|
||||||
assertEquals("5 key L0 rows", 1, params.mNumRows);
|
assertEquals("5 key L0 rows", 1, params.mNumRows);
|
||||||
|
@ -498,7 +498,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ [1] [2] [3] [4] [5]
|
// |___ [1] [2] [3] [4] [5]
|
||||||
public void testLayout5KeyL1() {
|
public void testLayout5KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("5 key L1 columns", 5, params.mNumColumns);
|
assertEquals("5 key L1 columns", 5, params.mNumColumns);
|
||||||
assertEquals("5 key L1 rows", 1, params.mNumRows);
|
assertEquals("5 key L1 rows", 1, params.mNumRows);
|
||||||
|
@ -515,7 +515,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// |___ ___ [3] [1] [2] [4] [5]
|
// |___ ___ [3] [1] [2] [4] [5]
|
||||||
public void testLayout5KeyL2() {
|
public void testLayout5KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("5 key L2 columns", 5, params.mNumColumns);
|
assertEquals("5 key L2 columns", 5, params.mNumColumns);
|
||||||
assertEquals("5 key L2 rows", 1, params.mNumRows);
|
assertEquals("5 key L2 rows", 1, params.mNumRows);
|
||||||
|
@ -532,7 +532,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [5] [4] [3] [2] [1]|
|
// [5] [4] [3] [2] [1]|
|
||||||
public void testLayout5KeyR0() {
|
public void testLayout5KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("5 key R0 columns", 5, params.mNumColumns);
|
assertEquals("5 key R0 columns", 5, params.mNumColumns);
|
||||||
assertEquals("5 key R0 rows", 1, params.mNumRows);
|
assertEquals("5 key R0 rows", 1, params.mNumRows);
|
||||||
|
@ -549,7 +549,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [5] [4] [3] [2] [1] ___|
|
// [5] [4] [3] [2] [1] ___|
|
||||||
public void testLayout5KeyR1() {
|
public void testLayout5KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("5 key R1 columns", 5, params.mNumColumns);
|
assertEquals("5 key R1 columns", 5, params.mNumColumns);
|
||||||
assertEquals("5 key R1 rows", 1, params.mNumRows);
|
assertEquals("5 key R1 rows", 1, params.mNumRows);
|
||||||
|
@ -566,7 +566,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [5] [4] [3] [1] [2] ___ ___|
|
// [5] [4] [3] [1] [2] ___ ___|
|
||||||
public void testLayout5KeyR2() {
|
public void testLayout5KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(5, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("5 key R2 columns", 5, params.mNumColumns);
|
assertEquals("5 key R2 columns", 5, params.mNumColumns);
|
||||||
assertEquals("5 key R2 rows", 1, params.mNumRows);
|
assertEquals("5 key R2 rows", 1, params.mNumRows);
|
||||||
|
@ -584,7 +584,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [6] [4] [5]
|
// [6] [4] [5]
|
||||||
// [3] [1] [2]
|
// [3] [1] [2]
|
||||||
public void testLayout6KeyM0() {
|
public void testLayout6KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("6 key columns", 3, params.mNumColumns);
|
assertEquals("6 key columns", 3, params.mNumColumns);
|
||||||
assertEquals("6 key rows", 2, params.mNumRows);
|
assertEquals("6 key rows", 2, params.mNumRows);
|
||||||
|
@ -603,7 +603,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |[4] [5] [6]
|
// |[4] [5] [6]
|
||||||
// |[1] [2] [3]
|
// |[1] [2] [3]
|
||||||
public void testLayout6KeyL0() {
|
public void testLayout6KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("6 key L0 columns", 3, params.mNumColumns);
|
assertEquals("6 key L0 columns", 3, params.mNumColumns);
|
||||||
assertEquals("6 key L0 rows", 2, params.mNumRows);
|
assertEquals("6 key L0 rows", 2, params.mNumRows);
|
||||||
|
@ -622,7 +622,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ [4] [5] [6]
|
// |___ [4] [5] [6]
|
||||||
// |___ [1] [2] [3]
|
// |___ [1] [2] [3]
|
||||||
public void testLayout6KeyL1() {
|
public void testLayout6KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("6 key L1 columns", 3, params.mNumColumns);
|
assertEquals("6 key L1 columns", 3, params.mNumColumns);
|
||||||
assertEquals("6 key L1 rows", 2, params.mNumRows);
|
assertEquals("6 key L1 rows", 2, params.mNumRows);
|
||||||
|
@ -641,7 +641,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ ___ [6] [4] [5]
|
// |___ ___ [6] [4] [5]
|
||||||
// |___ ___ [3] [1] [2]
|
// |___ ___ [3] [1] [2]
|
||||||
public void testLayout6KeyL2() {
|
public void testLayout6KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("6 key L2 columns", 3, params.mNumColumns);
|
assertEquals("6 key L2 columns", 3, params.mNumColumns);
|
||||||
assertEquals("6 key L2 rows", 2, params.mNumRows);
|
assertEquals("6 key L2 rows", 2, params.mNumRows);
|
||||||
|
@ -660,7 +660,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [6] [5] [4]|
|
// [6] [5] [4]|
|
||||||
// [3] [2] [1]|
|
// [3] [2] [1]|
|
||||||
public void testLayout6KeyR0() {
|
public void testLayout6KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("6 key R0 columns", 3, params.mNumColumns);
|
assertEquals("6 key R0 columns", 3, params.mNumColumns);
|
||||||
assertEquals("6 key R0 rows", 2, params.mNumRows);
|
assertEquals("6 key R0 rows", 2, params.mNumRows);
|
||||||
|
@ -679,7 +679,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [6] [5] [4] ___|
|
// [6] [5] [4] ___|
|
||||||
// [3] [2] [1] ___|
|
// [3] [2] [1] ___|
|
||||||
public void testLayout6KeyR1() {
|
public void testLayout6KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("6 key R1 columns", 3, params.mNumColumns);
|
assertEquals("6 key R1 columns", 3, params.mNumColumns);
|
||||||
assertEquals("6 key R1 rows", 2, params.mNumRows);
|
assertEquals("6 key R1 rows", 2, params.mNumRows);
|
||||||
|
@ -698,7 +698,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [6] [4] [5] ___ ___|
|
// [6] [4] [5] ___ ___|
|
||||||
// [3] [1] [2] ___ ___|
|
// [3] [1] [2] ___ ___|
|
||||||
public void testLayout6KeyR2() {
|
public void testLayout6KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(6, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("6 key R2 columns", 3, params.mNumColumns);
|
assertEquals("6 key R2 columns", 3, params.mNumColumns);
|
||||||
assertEquals("6 key R2 rows", 2, params.mNumRows);
|
assertEquals("6 key R2 rows", 2, params.mNumRows);
|
||||||
|
@ -717,7 +717,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [7] [5] [6]
|
// [7] [5] [6]
|
||||||
// [3] [1] [2] [4]
|
// [3] [1] [2] [4]
|
||||||
public void testLayout7KeyM0() {
|
public void testLayout7KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("7 key columns", 4, params.mNumColumns);
|
assertEquals("7 key columns", 4, params.mNumColumns);
|
||||||
assertEquals("7 key rows", 2, params.mNumRows);
|
assertEquals("7 key rows", 2, params.mNumRows);
|
||||||
|
@ -737,7 +737,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |[5] [6] [7]
|
// |[5] [6] [7]
|
||||||
// |[1] [2] [3] [4]
|
// |[1] [2] [3] [4]
|
||||||
public void testLayout7KeyL0() {
|
public void testLayout7KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("7 key L0 columns", 4, params.mNumColumns);
|
assertEquals("7 key L0 columns", 4, params.mNumColumns);
|
||||||
assertEquals("7 key L0 rows", 2, params.mNumRows);
|
assertEquals("7 key L0 rows", 2, params.mNumRows);
|
||||||
|
@ -757,7 +757,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ [5] [6] [7]
|
// |___ [5] [6] [7]
|
||||||
// |___ [1] [2] [3] [4]
|
// |___ [1] [2] [3] [4]
|
||||||
public void testLayout7KeyL1() {
|
public void testLayout7KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("7 key L1 columns", 4, params.mNumColumns);
|
assertEquals("7 key L1 columns", 4, params.mNumColumns);
|
||||||
assertEquals("7 key L1 rows", 2, params.mNumRows);
|
assertEquals("7 key L1 rows", 2, params.mNumRows);
|
||||||
|
@ -777,7 +777,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ ___ [7] [5] [6]
|
// |___ ___ [7] [5] [6]
|
||||||
// |___ ___ [3] [1] [2] [4]
|
// |___ ___ [3] [1] [2] [4]
|
||||||
public void testLayout7KeyL2() {
|
public void testLayout7KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("7 key L2 columns", 4, params.mNumColumns);
|
assertEquals("7 key L2 columns", 4, params.mNumColumns);
|
||||||
assertEquals("7 key L2 rows", 2, params.mNumRows);
|
assertEquals("7 key L2 rows", 2, params.mNumRows);
|
||||||
|
@ -797,7 +797,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [7] [6] [5]|
|
// [7] [6] [5]|
|
||||||
// [4] [3] [2] [1]|
|
// [4] [3] [2] [1]|
|
||||||
public void testLayout7KeyR0() {
|
public void testLayout7KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("7 key R0 columns", 4, params.mNumColumns);
|
assertEquals("7 key R0 columns", 4, params.mNumColumns);
|
||||||
assertEquals("7 key R0 rows", 2, params.mNumRows);
|
assertEquals("7 key R0 rows", 2, params.mNumRows);
|
||||||
|
@ -817,7 +817,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [7] [6] [5] ___|
|
// [7] [6] [5] ___|
|
||||||
// [4] [3] [2] [1] ___|
|
// [4] [3] [2] [1] ___|
|
||||||
public void testLayout7KeyR1() {
|
public void testLayout7KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("7 key R1 columns", 4, params.mNumColumns);
|
assertEquals("7 key R1 columns", 4, params.mNumColumns);
|
||||||
assertEquals("7 key R1 rows", 2, params.mNumRows);
|
assertEquals("7 key R1 rows", 2, params.mNumRows);
|
||||||
|
@ -837,7 +837,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [7] [5] [6] ___ ___|
|
// [7] [5] [6] ___ ___|
|
||||||
// [4] [3] [1] [2] ___ ___|
|
// [4] [3] [1] [2] ___ ___|
|
||||||
public void testLayout7KeyR2() {
|
public void testLayout7KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(7, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("7 key R2 columns", 4, params.mNumColumns);
|
assertEquals("7 key R2 columns", 4, params.mNumColumns);
|
||||||
assertEquals("7 key R2 rows", 2, params.mNumRows);
|
assertEquals("7 key R2 rows", 2, params.mNumRows);
|
||||||
|
@ -856,7 +856,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
|
|
||||||
// [7] [6] [5] [3] [1] [2] [4] ___|
|
// [7] [6] [5] [3] [1] [2] [4] ___|
|
||||||
public void testLayout7KeyR3Max7() {
|
public void testLayout7KeyR3Max7() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(7, 7, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(7, 7, WIDTH,
|
||||||
HEIGHT, XPOS_R3, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R3, KEYBOARD_WIDTH);
|
||||||
assertEquals("7 key R2 columns", 7, params.mNumColumns);
|
assertEquals("7 key R2 columns", 7, params.mNumColumns);
|
||||||
assertEquals("7 key R2 rows", 1, params.mNumRows);
|
assertEquals("7 key R2 rows", 1, params.mNumRows);
|
||||||
|
@ -876,7 +876,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [7] [5] [6] [8]
|
// [7] [5] [6] [8]
|
||||||
// [3] [1] [2] [4]
|
// [3] [1] [2] [4]
|
||||||
public void testLayout8KeyM0() {
|
public void testLayout8KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("8 key M0 columns", 4, params.mNumColumns);
|
assertEquals("8 key M0 columns", 4, params.mNumColumns);
|
||||||
assertEquals("8 key M0 rows", 2, params.mNumRows);
|
assertEquals("8 key M0 rows", 2, params.mNumRows);
|
||||||
|
@ -897,7 +897,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |[5] [6] [7] [8]
|
// |[5] [6] [7] [8]
|
||||||
// |[1] [2] [3] [4]
|
// |[1] [2] [3] [4]
|
||||||
public void testLayout8KeyL0() {
|
public void testLayout8KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("8 key L0 columns", 4, params.mNumColumns);
|
assertEquals("8 key L0 columns", 4, params.mNumColumns);
|
||||||
assertEquals("8 key L0 rows", 2, params.mNumRows);
|
assertEquals("8 key L0 rows", 2, params.mNumRows);
|
||||||
|
@ -918,7 +918,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ [5] [6] [7] [8]
|
// |___ [5] [6] [7] [8]
|
||||||
// |___ [1] [2] [3] [4]
|
// |___ [1] [2] [3] [4]
|
||||||
public void testLayout8KeyL1() {
|
public void testLayout8KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("8 key L1 columns", 4, params.mNumColumns);
|
assertEquals("8 key L1 columns", 4, params.mNumColumns);
|
||||||
assertEquals("8 key L1 rows", 2, params.mNumRows);
|
assertEquals("8 key L1 rows", 2, params.mNumRows);
|
||||||
|
@ -939,7 +939,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ ___ [7] [5] [6] [8]
|
// |___ ___ [7] [5] [6] [8]
|
||||||
// |___ ___ [3] [1] [2] [4]
|
// |___ ___ [3] [1] [2] [4]
|
||||||
public void testLayout8KeyL2() {
|
public void testLayout8KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("8 key L2 columns", 4, params.mNumColumns);
|
assertEquals("8 key L2 columns", 4, params.mNumColumns);
|
||||||
assertEquals("8 key L2 rows", 2, params.mNumRows);
|
assertEquals("8 key L2 rows", 2, params.mNumRows);
|
||||||
|
@ -960,7 +960,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [8] [7] [6] [5]|
|
// [8] [7] [6] [5]|
|
||||||
// [4] [3] [2] [1]|
|
// [4] [3] [2] [1]|
|
||||||
public void testLayout8KeyR0() {
|
public void testLayout8KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("8 key R0 columns", 4, params.mNumColumns);
|
assertEquals("8 key R0 columns", 4, params.mNumColumns);
|
||||||
assertEquals("8 key R0 rows", 2, params.mNumRows);
|
assertEquals("8 key R0 rows", 2, params.mNumRows);
|
||||||
|
@ -981,7 +981,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [8] [7] [6] [5] ___|
|
// [8] [7] [6] [5] ___|
|
||||||
// [4] [3] [2] [1] ___|
|
// [4] [3] [2] [1] ___|
|
||||||
public void testLayout8KeyR1() {
|
public void testLayout8KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("8 key R1 columns", 4, params.mNumColumns);
|
assertEquals("8 key R1 columns", 4, params.mNumColumns);
|
||||||
assertEquals("8 key R1 rows", 2, params.mNumRows);
|
assertEquals("8 key R1 rows", 2, params.mNumRows);
|
||||||
|
@ -1002,7 +1002,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [8] [7] [5] [6] ___ ___|
|
// [8] [7] [5] [6] ___ ___|
|
||||||
// [4] [3] [1] [2] ___ ___|
|
// [4] [3] [1] [2] ___ ___|
|
||||||
public void testLayout8KeyR2() {
|
public void testLayout8KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(8, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("8 key R2 columns", 4, params.mNumColumns);
|
assertEquals("8 key R2 columns", 4, params.mNumColumns);
|
||||||
assertEquals("8 key R2 rows", 2, params.mNumRows);
|
assertEquals("8 key R2 rows", 2, params.mNumRows);
|
||||||
|
@ -1023,7 +1023,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [8] [6] [7] [9]
|
// [8] [6] [7] [9]
|
||||||
// [5] [3] [1] [2] [4]
|
// [5] [3] [1] [2] [4]
|
||||||
public void testLayout9KeyM0() {
|
public void testLayout9KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("9 key M0 columns", 5, params.mNumColumns);
|
assertEquals("9 key M0 columns", 5, params.mNumColumns);
|
||||||
assertEquals("9 key M0 rows", 2, params.mNumRows);
|
assertEquals("9 key M0 rows", 2, params.mNumRows);
|
||||||
|
@ -1045,7 +1045,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |[6] [7] [8] [9]
|
// |[6] [7] [8] [9]
|
||||||
// |[1] [2] [3] [4] [5]
|
// |[1] [2] [3] [4] [5]
|
||||||
public void testLayout9KeyL0() {
|
public void testLayout9KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("9 key L0 columns", 5, params.mNumColumns);
|
assertEquals("9 key L0 columns", 5, params.mNumColumns);
|
||||||
assertEquals("9 key L0 rows", 2, params.mNumRows);
|
assertEquals("9 key L0 rows", 2, params.mNumRows);
|
||||||
|
@ -1067,7 +1067,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ [6] [7] [8] [9]
|
// |___ [6] [7] [8] [9]
|
||||||
// |___ [1] [2] [3] [4] [5]
|
// |___ [1] [2] [3] [4] [5]
|
||||||
public void testLayout9KeyL1() {
|
public void testLayout9KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("9 key L1 columns", 5, params.mNumColumns);
|
assertEquals("9 key L1 columns", 5, params.mNumColumns);
|
||||||
assertEquals("9 key L1 rows", 2, params.mNumRows);
|
assertEquals("9 key L1 rows", 2, params.mNumRows);
|
||||||
|
@ -1089,7 +1089,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ ___ [8] [6] [7] [9]
|
// |___ ___ [8] [6] [7] [9]
|
||||||
// |___ ___ [3] [1] [2] [4] [5]
|
// |___ ___ [3] [1] [2] [4] [5]
|
||||||
public void testLayout9KeyL2() {
|
public void testLayout9KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("9 key L2 columns", 5, params.mNumColumns);
|
assertEquals("9 key L2 columns", 5, params.mNumColumns);
|
||||||
assertEquals("9 key L2 rows", 2, params.mNumRows);
|
assertEquals("9 key L2 rows", 2, params.mNumRows);
|
||||||
|
@ -1111,7 +1111,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [9] [8] [7] [6]|
|
// [9] [8] [7] [6]|
|
||||||
// [5] [4] [3] [2] [1]|
|
// [5] [4] [3] [2] [1]|
|
||||||
public void testLayout9KeyR0() {
|
public void testLayout9KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("9 key R0 columns", 5, params.mNumColumns);
|
assertEquals("9 key R0 columns", 5, params.mNumColumns);
|
||||||
assertEquals("9 key R0 rows", 2, params.mNumRows);
|
assertEquals("9 key R0 rows", 2, params.mNumRows);
|
||||||
|
@ -1133,7 +1133,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [9] [8] [7] [6] ___|
|
// [9] [8] [7] [6] ___|
|
||||||
// [5] [4] [3] [2] [1] ___|
|
// [5] [4] [3] [2] [1] ___|
|
||||||
public void testLayout9KeyR1() {
|
public void testLayout9KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("9 key R1 columns", 5, params.mNumColumns);
|
assertEquals("9 key R1 columns", 5, params.mNumColumns);
|
||||||
assertEquals("9 key R1 rows", 2, params.mNumRows);
|
assertEquals("9 key R1 rows", 2, params.mNumRows);
|
||||||
|
@ -1155,7 +1155,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [9] [8] [6] [7] ___ ___|
|
// [9] [8] [6] [7] ___ ___|
|
||||||
// [5] [4] [3] [1] [2] ___ ___|
|
// [5] [4] [3] [1] [2] ___ ___|
|
||||||
public void testLayout9KeyR2() {
|
public void testLayout9KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(9, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("9 key R2 columns", 5, params.mNumColumns);
|
assertEquals("9 key R2 columns", 5, params.mNumColumns);
|
||||||
assertEquals("9 key R2 rows", 2, params.mNumRows);
|
assertEquals("9 key R2 rows", 2, params.mNumRows);
|
||||||
|
@ -1177,7 +1177,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [A] [8] [6] [7] [9]
|
// [A] [8] [6] [7] [9]
|
||||||
// [5] [3] [1] [2] [4]
|
// [5] [3] [1] [2] [4]
|
||||||
public void testLayout10KeyM0() {
|
public void testLayout10KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("10 key M0 columns", 5, params.mNumColumns);
|
assertEquals("10 key M0 columns", 5, params.mNumColumns);
|
||||||
assertEquals("10 key M0 rows", 2, params.mNumRows);
|
assertEquals("10 key M0 rows", 2, params.mNumRows);
|
||||||
|
@ -1200,7 +1200,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |[6] [7] [8] [9] [A]
|
// |[6] [7] [8] [9] [A]
|
||||||
// |[1] [2] [3] [4] [5]
|
// |[1] [2] [3] [4] [5]
|
||||||
public void testLayout10KeyL0() {
|
public void testLayout10KeyL0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L0, KEYBOARD_WIDTH);
|
||||||
assertEquals("10 key L0 columns", 5, params.mNumColumns);
|
assertEquals("10 key L0 columns", 5, params.mNumColumns);
|
||||||
assertEquals("10 key L0 rows", 2, params.mNumRows);
|
assertEquals("10 key L0 rows", 2, params.mNumRows);
|
||||||
|
@ -1223,7 +1223,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ [6] [7] [8] [9] [A]
|
// |___ [6] [7] [8] [9] [A]
|
||||||
// |___ [1] [2] [3] [4] [5]
|
// |___ [1] [2] [3] [4] [5]
|
||||||
public void testLayout10KeyL1() {
|
public void testLayout10KeyL1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L1, KEYBOARD_WIDTH);
|
||||||
assertEquals("10 key L1 columns", 5, params.mNumColumns);
|
assertEquals("10 key L1 columns", 5, params.mNumColumns);
|
||||||
assertEquals("10 key L1 rows", 2, params.mNumRows);
|
assertEquals("10 key L1 rows", 2, params.mNumRows);
|
||||||
|
@ -1246,7 +1246,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// |___ ___ [8] [6] [7] [9] [A]
|
// |___ ___ [8] [6] [7] [9] [A]
|
||||||
// |___ ___ [3] [1] [2] [4] [5]
|
// |___ ___ [3] [1] [2] [4] [5]
|
||||||
public void testLayout10KeyL2() {
|
public void testLayout10KeyL2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_L2, KEYBOARD_WIDTH);
|
||||||
assertEquals("10 key L2 columns", 5, params.mNumColumns);
|
assertEquals("10 key L2 columns", 5, params.mNumColumns);
|
||||||
assertEquals("10 key L2 rows", 2, params.mNumRows);
|
assertEquals("10 key L2 rows", 2, params.mNumRows);
|
||||||
|
@ -1269,7 +1269,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [A] [9] [8] [7] [6]|
|
// [A] [9] [8] [7] [6]|
|
||||||
// [5] [4] [3] [2] [1]|
|
// [5] [4] [3] [2] [1]|
|
||||||
public void testLayout10KeyR0() {
|
public void testLayout10KeyR0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R0, KEYBOARD_WIDTH);
|
||||||
assertEquals("10 key R0 columns", 5, params.mNumColumns);
|
assertEquals("10 key R0 columns", 5, params.mNumColumns);
|
||||||
assertEquals("10 key R0 rows", 2, params.mNumRows);
|
assertEquals("10 key R0 rows", 2, params.mNumRows);
|
||||||
|
@ -1292,7 +1292,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [A] [9] [8] [7] [6] ___|
|
// [A] [9] [8] [7] [6] ___|
|
||||||
// [5] [4] [3] [2] [1] ___|
|
// [5] [4] [3] [2] [1] ___|
|
||||||
public void testLayout10KeyR1() {
|
public void testLayout10KeyR1() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R1, KEYBOARD_WIDTH);
|
||||||
assertEquals("10 key R1 columns", 5, params.mNumColumns);
|
assertEquals("10 key R1 columns", 5, params.mNumColumns);
|
||||||
assertEquals("10 key R1 rows", 2, params.mNumRows);
|
assertEquals("10 key R1 rows", 2, params.mNumRows);
|
||||||
|
@ -1315,7 +1315,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [A] [9] [8] [6] [7] ___ ___|
|
// [A] [9] [8] [6] [7] ___ ___|
|
||||||
// [5] [4] [3] [1] [2] ___ ___|
|
// [5] [4] [3] [1] [2] ___ ___|
|
||||||
public void testLayout10KeyR2() {
|
public void testLayout10KeyR2() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(10, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_R2, KEYBOARD_WIDTH);
|
||||||
assertEquals("10 key R2 columns", 5, params.mNumColumns);
|
assertEquals("10 key R2 columns", 5, params.mNumColumns);
|
||||||
assertEquals("10 key R2 rows", 2, params.mNumRows);
|
assertEquals("10 key R2 rows", 2, params.mNumRows);
|
||||||
|
@ -1339,7 +1339,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [7] [5] [6] [8]
|
// [7] [5] [6] [8]
|
||||||
// [3] [1] [2] [4]
|
// [3] [1] [2] [4]
|
||||||
public void testLayout11KeyM0() {
|
public void testLayout11KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(11, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(11, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("11 key M0 columns", 4, params.mNumColumns);
|
assertEquals("11 key M0 columns", 4, params.mNumColumns);
|
||||||
assertEquals("11 key M0 rows", 3, params.mNumRows);
|
assertEquals("11 key M0 rows", 3, params.mNumRows);
|
||||||
|
@ -1364,7 +1364,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [7] [5] [6] [8]
|
// [7] [5] [6] [8]
|
||||||
// [3] [1] [2] [4]
|
// [3] [1] [2] [4]
|
||||||
public void testLayout12KeyM0() {
|
public void testLayout12KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(12, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(12, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("12 key M0 columns", 4, params.mNumColumns);
|
assertEquals("12 key M0 columns", 4, params.mNumColumns);
|
||||||
assertEquals("12 key M0 rows", 3, params.mNumRows);
|
assertEquals("12 key M0 rows", 3, params.mNumRows);
|
||||||
|
@ -1391,7 +1391,7 @@ public class MiniKeyboardBuilderTests extends AndroidTestCase {
|
||||||
// [A] [8] [6] [7] [9]
|
// [A] [8] [6] [7] [9]
|
||||||
// [5] [3] [1] [2] [4]
|
// [5] [3] [1] [2] [4]
|
||||||
public void testLayout13KeyM0() {
|
public void testLayout13KeyM0() {
|
||||||
MiniKeyboardParams params = new MiniKeyboardParams(13, MAX_COLUMNS, WIDTH,
|
MoreKeysKeyboardParams params = new MoreKeysKeyboardParams(13, MAX_COLUMNS, WIDTH,
|
||||||
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
HEIGHT, XPOS_M0, KEYBOARD_WIDTH);
|
||||||
assertEquals("13 key M0 columns", 5, params.mNumColumns);
|
assertEquals("13 key M0 columns", 5, params.mNumColumns);
|
||||||
assertEquals("13 key M0 rows", 3, params.mNumRows);
|
assertEquals("13 key M0 rows", 3, params.mNumRows);
|
Loading…
Reference in a new issue