Limit text length of EditText in Android -


What is the best way to limit the text length of EditText in Android?

Is there a way to do this through XML?

  android: maxLength = "10"  

Comments