How to get soft keyboard to enter email id in edittext in android

I use android: phoneNumber to open a soft keyboard to get the phone number in android.I want to open a keyboard that contains all the keys needed to write the email id in edittext.So is there a solution for this (email), for example phone number, thank you

+4
source share
3 answers

you can set the Input Type property for EditText

Image of Input Type

+2
source

Use textEmailAddress (0x00000021) as defined here: http://developer.android.com/reference/android/widget/TextView.html

In Java code:

myEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); 

In the XML properties:

  android:inputType="textEmailAddress" 
+9
source

use the code below to receive email email

 Editetxt email=(EditText)findViewById(R.id.edotetxtemail) email.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); 
+2
source

Source: https://habr.com/ru/post/1369102/


All Articles