Reputation: 42758
I tried
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName" >
I realize it can accept any characters. So, what is special having android:inputType="textPersonName"
, compared to not having it?
Upvotes: 40
Views: 18418
Reputation: 609
Spelling check is not done when using android:inputType="textPersonName"
but it is done in textCapWords
.
So if you use textPersonName
there won't be red underline for names but first letter of each name (firstname, middlename, lastname etc) won't be capitalized.
so best solution is combining both with an or
that is android:inputType="textPersonName|textCapWords"
.
now there won't be red underline for name and first letter would be capitalized also
Upvotes: 20
Reputation: 1
i am testing on android 5.0.1 and i insert a edittext with "textPersonName" input type and other edittext with "text" input type and in the two example the enter button is not showed. i really dont see differences between these input types.
regards
Upvotes: 0
Reputation: 554
The difference is that if you use "textPersonName", the user can not insert new lines (the enter button is not showed)
Upvotes: 41