EditText的属性:

android:numeric="integer"表示只在EditText中输入数字

android:singleLine="true"表示在EditText中输入的内容单行显示。不自动换行

android:maxLength="1"表示设置EditText输入内容最大长度为1

android:password  密码输入属性

代码如下:

android基础之EditText

android基础之EditText

由于EditText设置了numberic属性。singleLine属性 password属性 maxLength属性  所以只能输入一个数字  且密码显示。


转载于:https://blog.51cto.com/7832308/1429508

相关文章:

  • 2021-12-16
  • 2022-12-23
  • 2021-10-28
  • 2022-02-12
  • 2021-07-31
  • 2022-12-23
  • 2021-09-19
猜你喜欢
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-10-19
  • 2021-05-12
  • 2021-10-11
  • 2022-12-23
相关资源
相似解决方案