在 Android 中限制 EditText 文本长度的最佳方法是什么 [英] What's the best way to limit text length of EditText in Android
本文介绍了在 Android 中限制 EditText 文本长度的最佳方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 Android 中限制 EditText
文本长度的最佳方法是什么?
What's the best way to limit the text length of an EditText
in Android?
有没有办法通过 xml 来做到这一点?
Is there a way to do this via xml?
推荐答案
android:maxLength="10"
这篇关于在 Android 中限制 EditText 文本长度的最佳方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文