Friday, December 16, 2011

EditText limitation InputFilter


// you can add length limit to edit text using InputFilter .

InputFilter lengthFilter = new InputFilter.LengthFilter(30);
editText.setFilters(new InputFilter[]{lengthFilter});
 //want one line of text from the user
 editText.setSingleLine(true);

No comments:

Post a Comment

content -->