views:

165

answers:

1

What's the best way to limit the text length of an EditText in Android?

Is there a way to do this via xml?

+1  A: 

http://androidblogger.blogspot.com/2009/01/numeric-edittext-and-edittext-with-max.html

android:maxLength="10"

Berdon Magnus
D'oh! The same thing happened to me. I was looking at the code, and there isn't a setMaxLength method.
hgpc