InputType = PersonName?
You can combine the inputType attributes using an |
(or) operator.
http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType
The type of data being placed in a text field, used to help an input method decide how to let the user enter text. The constants here correspond to those defined by InputType. Generally you can select a single value, though some can be combined together as indicated. Setting this attribute to anything besides none also implies that the text is editable.
Must be one or more (separated by '|') of the following constant values.
So to combine the benefits of textPersonName
with textCapWords
, simply set the input type using this syntax:
android:inputType="textPersonName|textCapWords"
This answer gives a brief explanation of the benefits of using textPersonName for a name entry field.
inputype
attribute in EditText
widget: (tested on Android 4.4.3 and 2.3.3)
<EditText android:id="@+id/et_test" android:inputType="?????"/>
inputType: textLongMessage. Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: yes. Case: lowercase. Suggestion: yes. Addition chars: , and . and everything
inputType: textFilter. Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: yes. Case: lowercase. Suggestion: no. Addition chars: , and . and everything
inputType: textCapWords. Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: yes. Case: Camel Case. Suggestion: yes. Addition chars: , and . and everything
inputType: textCapSentences. Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: yes. Case: Sentence case. Suggestion: yes. Addition chars: , and . and everything
inputType: time. Keyboard: numeric. Enter button: Send/Next. Has emotion: no. Suggestion: no. Addition chars: :
inputType: textMultiLine. Keyboard: alphabet/default. Enter button: nextline. Has emotion: yes. Case: lowercase. Suggestion: yes. Addition chars: , and . and everything
inputType: number. Keyboard: numeric. Enter button: Send/Next. Has emotion: no. Suggestion: no. Addition chars: nothing
inputType: textEmailAddress. Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: no. Case: lowercase. Suggestion: no. Addition chars: @ and . and everything
inputType: (No type). Keyboard: alphabet/default. Enter button: nextline. Has emotion: yes. Case: lowercase. Suggestion: yes. Addition chars: , and . and everything
inputType: textPassword. Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: no. Case: lowercase. Suggestion: no. Addition chars: , and . and everything
inputType: text. Keyboard: Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: yes. Case: lowercase. Suggestion: yes. Addition chars: , and . and everything
inputType: textShortMessage. Keyboard: alphabet/default. Enter button: emotion. Has emotion: yes. Case: lowercase. Suggestion: yes. Addition chars: , and . and everything
inputType: textUri. Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: no. Case: lowercase. Suggestion: no. Addition chars: / and . and everything
inputType: textCapCharacters. Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: yes. Case: UPPERCASE. Suggestion: yes. Addition chars: , and . and everything
inputType: phone. Keyboard: numeric. Enter button: Send/Next. Has emotion: no. Suggestion: no. Addition chars: *** # . - / () W P N , +**
inputType: textPersonName. Keyboard: alphabet/default. Enter button: Send/Next. Has emotion: yes. Case: lowercase. Suggestion: yes. Addition chars: , and . and everything
Note: Auto-capitalization
setting as shown in the following screenshot will change the default behavior (True is default, textCapWords will work as expected. False will override textCapWords)
Note 2: In the Numeric keyboard
, ALL numbers are English 1234567890.
Note 3: Correction/Suggestion
setting overrides the default behavior.