android - OnTextChanged not called when edittext length is full -


i have scenario allow 1 character in edittext. in ontextchanged have checked if 1 letter input, switch focus next edittext

<edittext                 android:id="@+id/etpinpassword1"                 style="@style/edittext_with_weight"                 android:imeoptions="actionnext"                 android:inputtype="number"                 android:maxlength="1" /> 

and here textwatcher code:

ontextchanged :- >

if (isvalueentered(charsequence)) {                     etpinpassword2.requestfocus();                     etpinpassword2.setenabled(true);                     appendpassword(charsequence);                 }  private boolean isvalueentered(charsequence charsequence) {         return charsequence.length() > 0;     } 

everything working fine, except when come filled edittext, ontextchanged never called. want call again can switch focus next edittext if first 1 full.

the problem set max length 1, prevent entering other character.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -