Where can I find the values that InputType
can has?
I'm aware of http://developer.android.com/reference/android/text/InputType.html, but how should the values look like in layout XML files?
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.
getText(); demo. setText(); In below code, we took four EditText name, lastname, mobile and address and then use findviewbyid to looks through XML layout and returns reference to a view (In this case this is an EditText) and after that get text from all these EditText and set them in a TextView in a form of string.
android.text.InputType. Known indirect subclasses. EditorInfo. EditorInfo. An EditorInfo describes several attributes of a text editing object that an input method is communicating with (typically an EditText), most importantly the type of text content it contains and the current cursor position.
You can use the properties tab in eclipse to set various values.
here are all the possible values
Check here for explanations: http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType
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