New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(android): keyboard handling for TextField and TextArea #11662
Conversation
- TIMOB-27616: Decimal keyboard type only allows period for decimal point. Ignores current locale. * Added localized decimal separator support such as comma and Arabic's unicode separator. - TIMOB-27869: KEYBOARD_TYPE_ASCII should filter out emoji like iOS. - TIMOB-27870: KEYBOARD_TYPE_NUMBERS_PUNCTUATION should allow all chars except emoji like iOS. * Used to not allow letters of any language. Now supports all characters except emoji. - TIMOB-27871: Setting TextField/TextArea "editable" to false should allow user to copy text to clipboard. * Supported on Android 5.0 and higher. (Has issues on Android 4.4 when dynamically toggling "editable" property.) - Updated API docs to better clarify how keyboard types should work.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FR Passed, tested with the following test cases/scenarios.
Test Cases:
TIMOB-27616
Able to follow above instructions with no issues.
TIMOB-27869:
Now unable to enter emojis when using a KEYBOARD_TYPE_ASCII
keyboard:
var window = Ti.UI.createWindow();
window.add(Ti.UI.createTextField({
keyboardType: Ti.UI.KEYBOARD_TYPE_ASCII,
width: "90%",
}));
window.open();
TIMOB-27870:
Now able to use characters from other languages while still not being able to use emojis when using the KEYBOARD_TYPE_NUMBERS_PUNCTUATION
keyboard
var window = Ti.UI.createWindow();
window.add(Ti.UI.createTextField({
keyboardType: Ti.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION,
width: "90%",
}));
window.open();
TIMOB-27871
Able to copy text even if the editable
property is set to false
var window = Ti.UI.createWindow();
window.add(Ti.UI.createTextField({
keyboardType: Ti.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION,
width: "90%",
value: 'Copy me',
editable: false,
}));
window.open();
Localized Decimal Separator Test: TIMOB-27616
Able to now use a ',' as a decimal locator when changing locale, in this case locale was changed to Dansk. Locale can be changed from the android keyboard settings.
Test Environment
MacOS Big Sur: 11.0 Beta
Xcode: 12.0 Beta
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.0.0""
API29 Pixel XL emulator
@jquick-axway In the last step you mention |
@ssjsamir, we disable "fullscreen" editing with password mask using:
The reason we disable fullscreen editing is to work-around bugs on Google's end. Google will show the wrong virtual keyboard (or it'll have missing important keys) when fullscreen. |
JIRA:
Summary:
TextField
/TextArea
with decimal keyboard type only supports period '.' for decimal point.DecimalPadKeyListener
class.KEYBOARD_TYPE_ASCII
should not allow emoji like iOS.KEYBOARD_TYPE_NUMBERS_PUNCTUATION
should allow all chars except emoji like iOS.KEYBOARD_TYPE_DECIMAL_PAD
instead.TextField
orTextArea
property "editable" tofalse
should allow user to copy text to clipboard.Localized Decimal Separator Test:
The Big Test:
TextFieldKeyboardAdvancedTest.js
attached to TIMOB-27616 on Android.-123.456
for English locale.5
for the max length.