I am creating application with WebView
. I use the WebView
to show HTML pages, containing input fields. If the HTML input fields expect an email address to be typed by the user, then I want to enable an email-friendly keyboard layout. Is it possible to set up the HTML or the WebView
to show an email-friendly keyboard on Android, like you can on iPhone?
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.
To get the input type use getInputType() . int inputTypeValue = editText. getInputType(); The InputType values are defined (in hexadecimal) in the documentation.
You will only put
android:inputType="textEmailAddress"
in your edittext box.
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