-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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): improve parity for keyboardType #11134
Conversation
Refactor kyeboardType handling in order to get rid off redundant code and improve parity
|
private static final int KEYBOARD_NAMEPHONE_PAD = 6; | ||
private static final int KEYBOARD_DEFAULT = 7; | ||
private static final int KEYBOARD_DECIMAL_PAD = 8; | ||
|
||
// UIModule also has these as values - there's a chance they won't stay in sync if somebody changes one without changing these | ||
private static final int TEXT_AUTOCAPITALIZATION_NONE = 0; |
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.
We should probably remove these constants too, and use UIModule
.
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.
Same for RETURNKEY_*
constants
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.
Removed both blocks and pointed the constant to the UIModule namespace.
ping @ypbnv and @garymathews - have the changes satisfied the CR? Can we dismiss it and move to in qe testing? |
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.
CR: PASS
Answer for iOS related query-
|
FR Passed. The KEYBOARD_TYPE_NUMBER_PAD does not accept decimal point. The KEYBOARD_TYPE_DECIMAL_PAD is still different on iOS and Android as it accepts multiple points in iOS but just one in Android but these are by native behaviors. |
* refactor(android): improve parity for keyboardType Refactor kyeboardType handling in order to get rid off redundant code and improve parity * refactor(android): point TiUIText to the proper constants namespace Co-authored-by: Gary Mathews <contact@garymathews.com> Co-authored-by: Samir Mohammed <ssjsamir@users.noreply.github.com> Co-authored-by: Vijay Vikram Singh <vsingh@axway.com>
JIRA: https://jira.appcelerator.org/browse/TIMOB-17203
Description:
Refactor kyeboardType handling in order to get rid off redundant code and improve parity. Assign the TYPE_CLASS_TEXT only for text type input types.
Note: No unit tests since this is visual change.
@vijaysingh-axway Would you be able to check two things on the iOS related to the ticket - is the TYPE_NAMEPHONE_PAD constant used, because I see it is not taken into account in the Android code? Also is the expected behavior in iOS to be able to put multiple decimal points for TYPE_DECIMAL_PAD? That would not be a native android behavior. Setting the decimal tab flag only allows one decimal point.
Test case:
app.js
TYPE_NUMBER_PAD and TYPE_DECIMAL_PAD should no more allow typing non-number characters, besides one decimal point for the latter.