Initial keyboard on lowercase

后端 未结 2 569
半阙折子戏
半阙折子戏 2021-01-23 12:32

When I click on a InputText, the first letter of the keyboard begins on uppercase. As I am entering an e-mail, the ideal would always be lowercase. Is possible set this programa

相关标签:
2条回答
  • 2021-01-23 13:11

    See TextView.setInputType and inputType.

    0 讨论(0)
  • 2021-01-23 13:15

    In your XML file, you can use android:inputType. to set the field is a email input type.

    Programmatically, you can do that with setInputType()

    You can specify that myEditText is an email field in your XML file :

    android:inputType="textEmailAddress"
    

    Or programmatically:

    myEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
    
    0 讨论(0)
提交回复
热议问题