liangge0218

最近在学习android,碰到些小问题,记录下来

EditText可以在XML和代码中设置字数限制,在xml中

 

android:maxLength =“50”

在代码中可以

 

editText.setFilters( new  InputFilter[]{ new  InputFilter.LengthFilter( 100 )});

限制其只能输入数字的话可以

 

android:numeric="integer"

分类:

技术点:

相关文章:

  • 2021-12-28
  • 2021-10-19
  • 2021-12-08
  • 2021-11-15
  • 2021-11-05
  • 2021-12-08
  • 2021-12-25
  • 2021-11-28
猜你喜欢
  • 2021-12-08
  • 2021-10-19
  • 2021-12-08
  • 2021-12-25
  • 2021-10-19
  • 2021-12-08
相关资源
相似解决方案