1

I wanted the keyboard that android have with the shortcuts to ".com" to an editText, and another for an email input with the "@".

I've tried different things like this:

email_edit.setRawInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
facebook_edit.setRawInputType(InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT);
twitter_edit.setRawInputType(InputType.TYPE_TEXT_VARIATION_URI);

but nothing works and the keyboard that appears is the normal one.

Any suggestions?

Thanks!

4

1 回答 1

1

在您的 EditText 上,您可以设置输入类型:

android:inputType="textEmailAddress"

在代码中,您可以使用:

editText.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
于 2013-04-17T11:44:08.017 回答