When we use EditText widget in Android, then what are the basic difference while using Plain Text input type and Person name input type?
Textview : should be used for uneditable text which user wants to read but not to manipulate. e.g. News, Articles, Blogs. Plain text/ Edittext : should be used for taking user input in alphanumeric form. e.g. UserId, Comments.
EditText is used for user input. TextView is used to display text and is not editable by the user. TextView can be updated programatically at any time.
The android:inputType attribute allows you to specify various behaviors for the input method. Most importantly, if your text field is intended for basic text input (such as for a text message), you should enable auto spelling correction with the "textAutoCorrect" value.
There is no real difference between the two. To clarify what I mean when I say no real difference, the Person Name input simply has the attribute android:inputType="textPersonName"
preset. The person Name edit text will capitalize the first character of every word after the user hits the space button.
It is only to offer some convenience to developers who need to set the inputType
attribute to EditTex views. You will find some similar preset Text Fields in the Android SDK's ADT. And by using the attribute mentioned above, you can have the same effect on a Plain Text field too.
Based on your input type the softkeyboad display will change dynamically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With