mirror of
https://github.com/status-im/react-native.git
synced 2025-02-10 08:26:23 +00:00
Add phone-pad keyboard
Summary: With the numeric keyboard now being an actual numeric keyboard (before it was actually phone-pad), we need a proper phone-pad keyboard as well. public Reviewed By: dmmiller Differential Revision: D2830707 fb-gh-sync-id: 80a1d314eac730e691de73a31342c014a2fa5ba6
This commit is contained in:
parent
ebf42d9813
commit
25c3dd140f
@ -242,6 +242,7 @@ exports.examples = [
|
|||||||
'default',
|
'default',
|
||||||
'email-address',
|
'email-address',
|
||||||
'numeric',
|
'numeric',
|
||||||
|
'phone-pad',
|
||||||
];
|
];
|
||||||
var examples = keyboardTypes.map((type) => {
|
var examples = keyboardTypes.map((type) => {
|
||||||
return (
|
return (
|
||||||
|
@ -134,14 +134,14 @@ var TextInput = React.createClass({
|
|||||||
keyboardType: PropTypes.oneOf([
|
keyboardType: PropTypes.oneOf([
|
||||||
// Cross-platform
|
// Cross-platform
|
||||||
'default',
|
'default',
|
||||||
'numeric',
|
|
||||||
'email-address',
|
'email-address',
|
||||||
|
'numeric',
|
||||||
|
'phone-pad',
|
||||||
// iOS-only
|
// iOS-only
|
||||||
'ascii-capable',
|
'ascii-capable',
|
||||||
'numbers-and-punctuation',
|
'numbers-and-punctuation',
|
||||||
'url',
|
'url',
|
||||||
'number-pad',
|
'number-pad',
|
||||||
'phone-pad',
|
|
||||||
'name-phone-pad',
|
'name-phone-pad',
|
||||||
'decimal-pad',
|
'decimal-pad',
|
||||||
'twitter',
|
'twitter',
|
||||||
|
@ -60,6 +60,7 @@ public class ReactTextInputManager extends
|
|||||||
|
|
||||||
private static final String KEYBOARD_TYPE_EMAIL_ADDRESS = "email-address";
|
private static final String KEYBOARD_TYPE_EMAIL_ADDRESS = "email-address";
|
||||||
private static final String KEYBOARD_TYPE_NUMERIC = "numeric";
|
private static final String KEYBOARD_TYPE_NUMERIC = "numeric";
|
||||||
|
private static final String KEYBOARD_TYPE_PHONE_PAD = "phone-pad";
|
||||||
private static final InputFilter[] EMPTY_FILTERS = new InputFilter[0];
|
private static final InputFilter[] EMPTY_FILTERS = new InputFilter[0];
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -278,6 +279,8 @@ public class ReactTextInputManager extends
|
|||||||
flagsToSet = INPUT_TYPE_KEYBOARD_NUMBERED;
|
flagsToSet = INPUT_TYPE_KEYBOARD_NUMBERED;
|
||||||
} else if (KEYBOARD_TYPE_EMAIL_ADDRESS.equalsIgnoreCase(keyboardType)) {
|
} else if (KEYBOARD_TYPE_EMAIL_ADDRESS.equalsIgnoreCase(keyboardType)) {
|
||||||
flagsToSet = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS | InputType.TYPE_CLASS_TEXT;
|
flagsToSet = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS | InputType.TYPE_CLASS_TEXT;
|
||||||
|
} else if (KEYBOARD_TYPE_PHONE_PAD.equalsIgnoreCase(keyboardType)) {
|
||||||
|
flagsToSet = InputType.TYPE_CLASS_PHONE;
|
||||||
}
|
}
|
||||||
updateStagedInputTypeFlag(
|
updateStagedInputTypeFlag(
|
||||||
view,
|
view,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user