[TIMOB-27870] Android: KEYBOARD_TYPE_NUMBERS_PUNCTUATION should allow all chars except emoji like iOS
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-08-11T14:53:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.1.0 |
Components | Android |
Labels | TextArea, TextField, android, emoji, keyboardType, parity |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2020-04-28T01:09:44.000+0000 |
Updated | 2020-08-11T14:53:23.000+0000 |
Description
*Summary:*
On iOS,
KEYBOARD_TYPE_NUMBERS_PUNCTUATION
allows all characters to be entered such as letters (all languages), numbers, and symbols... but not emoji. The only difference between this keyboard type and KEYBOARD_TYPE_ASCII
is that iOS shows the "Numbers and Punctuations" keyboard layout by default when shown, but still allows the end-user to switch keyboards if they wish.
On Android, this keyboard type won't let the end-user enter any letters/symbols from any language. It will automatically filter them out when the end-user attempts to enter them. This keyboard type should be changed to match iOS' behavior.
*Test Code:*
var window = Ti.UI.createWindow();
window.add(Ti.UI.createTextField({
keyboardType: Ti.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION,
width: "90%",
}));
window.open();
*Note 1:*
The iOS UIKeyboardTypeNumbersAndPunctuation
and UIKeyboardTypeASCIICapable
types are commonly used to display keyboards without emoji. This is the most important detail we need to replicate on Android.
*Note 2:*
Android does not have an API which lets us display the numbers side of the keyboard by default when using a normal text keyboard. So, this is something we can't replicate from iOS.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/11662
FR Passed, Waiting on Jenkins build.
merged to master for 9.1.0 target
*Closing ticket*. Improvement verified in SDK version
9.1.0.v20200810120239
. *Test and other information can be found at:* https://github.com/appcelerator/titanium_mobile/pull/11662