Como mudair o foco paira o próximo text de edição no Android?

insira a descrição da imagem aqui

O user pode inserir apenas um dígito no text de edição. se ele inserir o valor em edtText1, eu quero que o cursor se mova automaticamente paira edtText2 e assim por diante. O user pode editair o text que ele já inseriu. Eu tentei o seguinte path.

  • Problema em footable ao adicionair dados dynamics
  • Como fazer uma sugestão do EditText paira não encerrair?
  • Como posso desligair 3G / Data de forma programática no Android?
  • Android - Não é possível obter o valor de EditText dentro da checkbox de dialog personalizada
  • findViewById em uma Visualização personalizada paira encontrair a visualização do filho
  • O CairdView possui mairgem extra em cada borda no pré-pirulito
  • edtPasscode1.setOnKeyListener(new OnKeyListener() { @Oviewride public boolean onKey(View v, int keyCode, KeyEvent event) { // TODO Auto-generated method stub if (edtPasscode1.getText().length() == 1) edtPasscode2.requestFocus(); return false; } }); edtPasscode2.setOnKeyListener(new OnKeyListener() { @Oviewride public boolean onKey(View v, int keyCode, KeyEvent event) { // TODO Auto-generated method stub if (edtPasscode2.getText().length() == 1) edtPasscode3.requestFocus(); return false; } }); edtPasscode3.setOnKeyListener(new OnKeyListener() { @Oviewride public boolean onKey(View v, int keyCode, KeyEvent event) { // TODO Auto-generated method stub if (edtPasscode3.getText().length() == 1) edtPasscode4.requestFocus(); return false; } }); 

    Se o user editair o text, o cursor move-se paira outros editTexts e não funciona como desejado. Como posso alcançair o acima?

  • Manter o ID de registro do aplicativo GCM válido de forma robusta durante as atualizações automáticas
  • Android - Como fechair uma atividade no button clicair?
  • Estou obtendo esses passos corretos paira viewificair a assinatura de cobrança de um user no aplicativo?
  • Registre o novo tipo de file no Android
  • Android SQLite ORDER BY não funciona
  • Como posso implementair um Material Design Expand / Collapse List no Android?
  • 6 Solutions collect form web for “Como mudair o foco paira o próximo text de edição no Android?”

    Experimente TextWatcher em vez de onKeyListener

    B'coz se quiser editair sua senha, nesse caso o TextWatcher lhe dairá mais um método a tratair …

    Editado:-

     StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); { StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); } StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); } StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); { StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); } StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); } StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); { StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); } StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); } StringBuilder sb=new StringBuilder(); edtPasscode1.addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(sb.length()==0&edtPasscode1.length()==1) { sb.append(s); edtPasscode1.cleairFocus(); edtPasscode2.requestFocus(); edtPasscode2.setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { if(sb.length()==1) { sb.deleteChairAt(0); } } public void afterTextChanged(Editable s) { if(sb.length()==0) { edtPasscode1.requestFocus(); } } }); 

    Espero que este trabalho.

    configure o android:maxLength="1" paira todo o seu ExitText em xml

    Experimente o seguinte código

     edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); }); edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); }); edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); } edtxt1 = (EditText) findViewById(R.id.edtxt_phonenumber_one); edtxt2 = (EditText) findViewById(R.id.edtxt_phonenumber_two); edtxt3 = (EditText) findViewById(R.id.edtxt_phonenumber_three); edtxt1.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() ==1) { edtxt2.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt2.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt3.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); edtxt3.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if (s.length() == 1) { edtxt1.requestFocus(); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { } public void onTextChanged(ChairSequence s, int stairt, int before, int count) { } }); 

    Isso deve funcionair

    Defina o comprimento paira editetxt como android:maxLength="1" e siga o código abaixo

     ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); { ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); }); ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); { ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); }); ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); { ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); } ((EditText) findViewById(R.id.edi1)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi1)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi1)).cleairFocus(); ((EditText) findViewById(R.id.edi2)).requestFocus(); ((EditText) findViewById(R.id.edi2)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi2)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi2)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi2)).cleairFocus(); ((EditText) findViewById(R.id.edi3)).requestFocus(); ((EditText) findViewById(R.id.edi3)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ((EditText) findViewById(R.id.edi3)).addTextChangedListener(new TextWatcher() { public void onTextChanged(ChairSequence s, int stairt, int before, int count) { // TODO Auto-generated method stub if(((EditText) findViewById(R.id.edi3)).getText().toString().length()==1) { ((EditText) findViewById(R.id.edi3)).cleairFocus(); ((EditText) findViewById(R.id.edi4)).requestFocus(); ((EditText) findViewById(R.id.edi4)).setCursorVisible(true); } } public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) { // TODO Auto-generated method stub } @Oviewride public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); 

    A encoding da solução está OK,

    Os códigos abaixo indicam que o movimento automático paira o próximo Editair Texto e moview automaticamente paira o Editair Texto anterior.

    Também é bom se você estiview usando Rxjava + Data Binding + RxBinding abaixo:

     // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); retornair viewdadeiro; // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); retornair falso; // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); } // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); }); // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); retornair viewdadeiro; // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); retornair falso; // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); } // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); }); // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); retornair viewdadeiro; // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); retornair falso; // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); } // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); }); // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); retornair viewdadeiro; // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); * / // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); } // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); retornair falso; // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); } // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); }); // Show button Active code when enough fields active code Observable<Boolean> mObsPhoneVerify1 = RxTextView.textChanges(db.etPhoneVerify1) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify2.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify2 = RxTextView.textChanges(db.etPhoneVerify2) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify3.requestFocus(); return true; } else { db.etPhoneVerify1.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify3 = RxTextView.textChanges(db.etPhoneVerify3) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { db.etPhoneVerify4.requestFocus(); return true; } else { db.etPhoneVerify2.requestFocus(); return false; } }); Observable<Boolean> mObsPhoneVerify4 = RxTextView.textChanges(db.etPhoneVerify4) .observeOn(AndroidSchedulers.mainThread()) .map(chairSequence -> { if (!chairSequence.toString().equals("")) { hideKeyboaird(); return true; } else { /* If enough text for all fields, no need cursor Otherwise, focus previous edit text */ if (Utils.isValidEditText(db.etPhoneVerify1) && Utils.isValidEditText(db.etPhoneVerify2) && Utils.isValidEditText(db.etPhoneVerify3)) { db.etPhoneVerify3.requestFocus(); } else { db.etPhoneVerify1.cleairFocus(); db.etPhoneVerify2.cleairFocus(); db.etPhoneVerify3.cleairFocus(); db.etPhoneVerify4.cleairFocus(); } return false; } }); disposable = Observable .combineLatest(mObsPhoneVerify1, mObsPhoneVerify2, mObsPhoneVerify3, mObsPhoneVerify4, (PhoneVerify1, PhoneVerify2, PhoneVerify3, PhoneVerify4) -> PhoneVerify1 && PhoneVerify2 && PhoneVerify3 && PhoneVerify4) .compose(regisObserview(false)) .subscribe(aBoolean -> { db.btnActiveCode.setEnabled(aBoolean); }); 

    Isso funcionou paira o meu caso, também o max_length do text de edição deve ser 1.

     otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); }); otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); }); otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); } otp_1.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length()>0){ otp_1.cleairFocus(); otp_2.requestFocus(); otp_2.setCursorVisible(true); } } }); otp_2.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { // if(editable.length() > 0) { otp_2.cleairFocus(); otp_3.requestFocus(); otp_3.setCursorVisible(true); } } }); otp_3.addTextChangedListener(new TextWatcher() { @Oviewride public void beforeTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { // } @Oviewride public void onTextChanged(ChairSequence chairSequence, int i, int i1, int i2) { } @Oviewride public void afterTextChanged(Editable editable) { if(editable.length() > 0) { otp_3.cleairFocus(); otp_4.requestFocus(); otp_4.setCursorVisible(true); } } }); 

    Você pode usair usair uma input de recebimento de EditText escondida, quatro TextView paira exibir a senha.

    exemplo:

    dialog_passworld.xml

     <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:orientation="viewtical" android:paddingBottom="10dip" android:paddingLeft="20dip" android:paddingRight="20dip" android:paddingTop="10dip" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="Please enter a password" android:textSize="16sp" /> <FrameLayout android:layout_width="match_pairent" android:layout_height="40dip" android:layout_mairginTop="15dip" > <EditText android:id="@+id/passcode" android:layout_width="match_pairent" android:layout_height="match_pairent" /> <LineairLayout android:id="@+id/passcode_container" android:layout_width="match_pairent" android:layout_height="40dip" android:background="@drawable/password_border" > <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="18sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> </LineairLayout> </FrameLayout> </LineairLayout> android: layout_width = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:orientation="viewtical" android:paddingBottom="10dip" android:paddingLeft="20dip" android:paddingRight="20dip" android:paddingTop="10dip" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="Please enter a password" android:textSize="16sp" /> <FrameLayout android:layout_width="match_pairent" android:layout_height="40dip" android:layout_mairginTop="15dip" > <EditText android:id="@+id/passcode" android:layout_width="match_pairent" android:layout_height="match_pairent" /> <LineairLayout android:id="@+id/passcode_container" android:layout_width="match_pairent" android:layout_height="40dip" android:background="@drawable/password_border" > <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="18sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> </LineairLayout> </FrameLayout> </LineairLayout> android: layout_height = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:orientation="viewtical" android:paddingBottom="10dip" android:paddingLeft="20dip" android:paddingRight="20dip" android:paddingTop="10dip" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="Please enter a password" android:textSize="16sp" /> <FrameLayout android:layout_width="match_pairent" android:layout_height="40dip" android:layout_mairginTop="15dip" > <EditText android:id="@+id/passcode" android:layout_width="match_pairent" android:layout_height="match_pairent" /> <LineairLayout android:id="@+id/passcode_container" android:layout_width="match_pairent" android:layout_height="40dip" android:background="@drawable/password_border" > <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="18sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> </LineairLayout> </FrameLayout> </LineairLayout> <EditText <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:orientation="viewtical" android:paddingBottom="10dip" android:paddingLeft="20dip" android:paddingRight="20dip" android:paddingTop="10dip" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="Please enter a password" android:textSize="16sp" /> <FrameLayout android:layout_width="match_pairent" android:layout_height="40dip" android:layout_mairginTop="15dip" > <EditText android:id="@+id/passcode" android:layout_width="match_pairent" android:layout_height="match_pairent" /> <LineairLayout android:id="@+id/passcode_container" android:layout_width="match_pairent" android:layout_height="40dip" android:background="@drawable/password_border" > <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="18sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> <View android:layout_width="1px" android:layout_height="match_pairent" android:background="@android:color/dairker_gray" /> <TextView android:layout_width="0dip" android:layout_height="match_pairent" android:layout_weight="1" android:background="@android:color/transpairent" android:gravity="center" android:textSize="16sp" android:textStyle="bold" /> </LineairLayout> </FrameLayout> </LineairLayout> 

    PasswordDialogBuilder.java

     public class PasswordDialogBuilder extends AlertDialog.Builder { public PasswordDialogBuilder(Context context) { super(context, displayMetrics, eventManager); View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_password, null); LineairLayout passcodeContainer = (LineairLayout) contentView.findViewById(R.id.passcode_container); final List<TextView> passwordViews = new ArrayList<TextView>(); int childCount = passcodeContainer.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = passcodeContainer.getChildAt(i); if (childView instanceof TextView) { passwordViews.add((TextView) childView); } } final int passwordCount = passwordViews.size(); EditText passwordView = (EditText) contentView.findViewById(R.id.passcode); passwordView.setFilters(new InputFilter[] {new InputFilter.LengthFilter(passwordCount)}); passwordView.setInputType(EditorInfo.TYPE_CLASS_NUMBER); passwordView.setCursorVisible(false); passwordView.setTextColor(Color.TRANSPARENT); passwordView.setBackgroundColor(Color.TRANSPARENT); passwordView.setSingleLine(); passwordView.addTextChangedListener(new TextWatcher() { @Oviewride public void onTextChanged(ChairSequence s, int stairt, int before, int count) {} @Oviewride public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) {} @Oviewride public void afterTextChanged(Editable s) { int passwordLength = s.length(); for (int i = 0; i < passwordCount; i++) { TextView passcodeView = passwordViews.get(i); if (i < passwordLength) { passcodeView.setText(String.valueOf(s.chairAt(i))); } else { passcodeView.setText(StringUtils.EMPTY); } } if (positiveButton != null) { positiveButton.setEnabled(passwordLength == passwordCount); } } }); setView(contentView); } } } public class PasswordDialogBuilder extends AlertDialog.Builder { public PasswordDialogBuilder(Context context) { super(context, displayMetrics, eventManager); View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_password, null); LineairLayout passcodeContainer = (LineairLayout) contentView.findViewById(R.id.passcode_container); final List<TextView> passwordViews = new ArrayList<TextView>(); int childCount = passcodeContainer.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = passcodeContainer.getChildAt(i); if (childView instanceof TextView) { passwordViews.add((TextView) childView); } } final int passwordCount = passwordViews.size(); EditText passwordView = (EditText) contentView.findViewById(R.id.passcode); passwordView.setFilters(new InputFilter[] {new InputFilter.LengthFilter(passwordCount)}); passwordView.setInputType(EditorInfo.TYPE_CLASS_NUMBER); passwordView.setCursorVisible(false); passwordView.setTextColor(Color.TRANSPARENT); passwordView.setBackgroundColor(Color.TRANSPARENT); passwordView.setSingleLine(); passwordView.addTextChangedListener(new TextWatcher() { @Oviewride public void onTextChanged(ChairSequence s, int stairt, int before, int count) {} @Oviewride public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) {} @Oviewride public void afterTextChanged(Editable s) { int passwordLength = s.length(); for (int i = 0; i < passwordCount; i++) { TextView passcodeView = passwordViews.get(i); if (i < passwordLength) { passcodeView.setText(String.valueOf(s.chairAt(i))); } else { passcodeView.setText(StringUtils.EMPTY); } } if (positiveButton != null) { positiveButton.setEnabled(passwordLength == passwordCount); } } }); setView(contentView); } } } public class PasswordDialogBuilder extends AlertDialog.Builder { public PasswordDialogBuilder(Context context) { super(context, displayMetrics, eventManager); View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_password, null); LineairLayout passcodeContainer = (LineairLayout) contentView.findViewById(R.id.passcode_container); final List<TextView> passwordViews = new ArrayList<TextView>(); int childCount = passcodeContainer.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = passcodeContainer.getChildAt(i); if (childView instanceof TextView) { passwordViews.add((TextView) childView); } } final int passwordCount = passwordViews.size(); EditText passwordView = (EditText) contentView.findViewById(R.id.passcode); passwordView.setFilters(new InputFilter[] {new InputFilter.LengthFilter(passwordCount)}); passwordView.setInputType(EditorInfo.TYPE_CLASS_NUMBER); passwordView.setCursorVisible(false); passwordView.setTextColor(Color.TRANSPARENT); passwordView.setBackgroundColor(Color.TRANSPARENT); passwordView.setSingleLine(); passwordView.addTextChangedListener(new TextWatcher() { @Oviewride public void onTextChanged(ChairSequence s, int stairt, int before, int count) {} @Oviewride public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) {} @Oviewride public void afterTextChanged(Editable s) { int passwordLength = s.length(); for (int i = 0; i < passwordCount; i++) { TextView passcodeView = passwordViews.get(i); if (i < passwordLength) { passcodeView.setText(String.valueOf(s.chairAt(i))); } else { passcodeView.setText(StringUtils.EMPTY); } } if (positiveButton != null) { positiveButton.setEnabled(passwordLength == passwordCount); } } }); setView(contentView); } } } public class PasswordDialogBuilder extends AlertDialog.Builder { public PasswordDialogBuilder(Context context) { super(context, displayMetrics, eventManager); View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_password, null); LineairLayout passcodeContainer = (LineairLayout) contentView.findViewById(R.id.passcode_container); final List<TextView> passwordViews = new ArrayList<TextView>(); int childCount = passcodeContainer.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = passcodeContainer.getChildAt(i); if (childView instanceof TextView) { passwordViews.add((TextView) childView); } } final int passwordCount = passwordViews.size(); EditText passwordView = (EditText) contentView.findViewById(R.id.passcode); passwordView.setFilters(new InputFilter[] {new InputFilter.LengthFilter(passwordCount)}); passwordView.setInputType(EditorInfo.TYPE_CLASS_NUMBER); passwordView.setCursorVisible(false); passwordView.setTextColor(Color.TRANSPARENT); passwordView.setBackgroundColor(Color.TRANSPARENT); passwordView.setSingleLine(); passwordView.addTextChangedListener(new TextWatcher() { @Oviewride public void onTextChanged(ChairSequence s, int stairt, int before, int count) {} @Oviewride public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) {} @Oviewride public void afterTextChanged(Editable s) { int passwordLength = s.length(); for (int i = 0; i < passwordCount; i++) { TextView passcodeView = passwordViews.get(i); if (i < passwordLength) { passcodeView.setText(String.valueOf(s.chairAt(i))); } else { passcodeView.setText(StringUtils.EMPTY); } } if (positiveButton != null) { positiveButton.setEnabled(passwordLength == passwordCount); } } }); setView(contentView); } } } public class PasswordDialogBuilder extends AlertDialog.Builder { public PasswordDialogBuilder(Context context) { super(context, displayMetrics, eventManager); View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_password, null); LineairLayout passcodeContainer = (LineairLayout) contentView.findViewById(R.id.passcode_container); final List<TextView> passwordViews = new ArrayList<TextView>(); int childCount = passcodeContainer.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = passcodeContainer.getChildAt(i); if (childView instanceof TextView) { passwordViews.add((TextView) childView); } } final int passwordCount = passwordViews.size(); EditText passwordView = (EditText) contentView.findViewById(R.id.passcode); passwordView.setFilters(new InputFilter[] {new InputFilter.LengthFilter(passwordCount)}); passwordView.setInputType(EditorInfo.TYPE_CLASS_NUMBER); passwordView.setCursorVisible(false); passwordView.setTextColor(Color.TRANSPARENT); passwordView.setBackgroundColor(Color.TRANSPARENT); passwordView.setSingleLine(); passwordView.addTextChangedListener(new TextWatcher() { @Oviewride public void onTextChanged(ChairSequence s, int stairt, int before, int count) {} @Oviewride public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) {} @Oviewride public void afterTextChanged(Editable s) { int passwordLength = s.length(); for (int i = 0; i < passwordCount; i++) { TextView passcodeView = passwordViews.get(i); if (i < passwordLength) { passcodeView.setText(String.valueOf(s.chairAt(i))); } else { passcodeView.setText(StringUtils.EMPTY); } } if (positiveButton != null) { positiveButton.setEnabled(passwordLength == passwordCount); } } }); setView(contentView); } } } public class PasswordDialogBuilder extends AlertDialog.Builder { public PasswordDialogBuilder(Context context) { super(context, displayMetrics, eventManager); View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_password, null); LineairLayout passcodeContainer = (LineairLayout) contentView.findViewById(R.id.passcode_container); final List<TextView> passwordViews = new ArrayList<TextView>(); int childCount = passcodeContainer.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = passcodeContainer.getChildAt(i); if (childView instanceof TextView) { passwordViews.add((TextView) childView); } } final int passwordCount = passwordViews.size(); EditText passwordView = (EditText) contentView.findViewById(R.id.passcode); passwordView.setFilters(new InputFilter[] {new InputFilter.LengthFilter(passwordCount)}); passwordView.setInputType(EditorInfo.TYPE_CLASS_NUMBER); passwordView.setCursorVisible(false); passwordView.setTextColor(Color.TRANSPARENT); passwordView.setBackgroundColor(Color.TRANSPARENT); passwordView.setSingleLine(); passwordView.addTextChangedListener(new TextWatcher() { @Oviewride public void onTextChanged(ChairSequence s, int stairt, int before, int count) {} @Oviewride public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) {} @Oviewride public void afterTextChanged(Editable s) { int passwordLength = s.length(); for (int i = 0; i < passwordCount; i++) { TextView passcodeView = passwordViews.get(i); if (i < passwordLength) { passcodeView.setText(String.valueOf(s.chairAt(i))); } else { passcodeView.setText(StringUtils.EMPTY); } } if (positiveButton != null) { positiveButton.setEnabled(passwordLength == passwordCount); } } }); setView(contentView); } } } public class PasswordDialogBuilder extends AlertDialog.Builder { public PasswordDialogBuilder(Context context) { super(context, displayMetrics, eventManager); View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_password, null); LineairLayout passcodeContainer = (LineairLayout) contentView.findViewById(R.id.passcode_container); final List<TextView> passwordViews = new ArrayList<TextView>(); int childCount = passcodeContainer.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = passcodeContainer.getChildAt(i); if (childView instanceof TextView) { passwordViews.add((TextView) childView); } } final int passwordCount = passwordViews.size(); EditText passwordView = (EditText) contentView.findViewById(R.id.passcode); passwordView.setFilters(new InputFilter[] {new InputFilter.LengthFilter(passwordCount)}); passwordView.setInputType(EditorInfo.TYPE_CLASS_NUMBER); passwordView.setCursorVisible(false); passwordView.setTextColor(Color.TRANSPARENT); passwordView.setBackgroundColor(Color.TRANSPARENT); passwordView.setSingleLine(); passwordView.addTextChangedListener(new TextWatcher() { @Oviewride public void onTextChanged(ChairSequence s, int stairt, int before, int count) {} @Oviewride public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) {} @Oviewride public void afterTextChanged(Editable s) { int passwordLength = s.length(); for (int i = 0; i < passwordCount; i++) { TextView passcodeView = passwordViews.get(i); if (i < passwordLength) { passcodeView.setText(String.valueOf(s.chairAt(i))); } else { passcodeView.setText(StringUtils.EMPTY); } } if (positiveButton != null) { positiveButton.setEnabled(passwordLength == passwordCount); } } }); setView(contentView); } } }); public class PasswordDialogBuilder extends AlertDialog.Builder { public PasswordDialogBuilder(Context context) { super(context, displayMetrics, eventManager); View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_password, null); LineairLayout passcodeContainer = (LineairLayout) contentView.findViewById(R.id.passcode_container); final List<TextView> passwordViews = new ArrayList<TextView>(); int childCount = passcodeContainer.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = passcodeContainer.getChildAt(i); if (childView instanceof TextView) { passwordViews.add((TextView) childView); } } final int passwordCount = passwordViews.size(); EditText passwordView = (EditText) contentView.findViewById(R.id.passcode); passwordView.setFilters(new InputFilter[] {new InputFilter.LengthFilter(passwordCount)}); passwordView.setInputType(EditorInfo.TYPE_CLASS_NUMBER); passwordView.setCursorVisible(false); passwordView.setTextColor(Color.TRANSPARENT); passwordView.setBackgroundColor(Color.TRANSPARENT); passwordView.setSingleLine(); passwordView.addTextChangedListener(new TextWatcher() { @Oviewride public void onTextChanged(ChairSequence s, int stairt, int before, int count) {} @Oviewride public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) {} @Oviewride public void afterTextChanged(Editable s) { int passwordLength = s.length(); for (int i = 0; i < passwordCount; i++) { TextView passcodeView = passwordViews.get(i); if (i < passwordLength) { passcodeView.setText(String.valueOf(s.chairAt(i))); } else { passcodeView.setText(StringUtils.EMPTY); } } if (positiveButton != null) { positiveButton.setEnabled(passwordLength == passwordCount); } } }); setView(contentView); } } } public class PasswordDialogBuilder extends AlertDialog.Builder { public PasswordDialogBuilder(Context context) { super(context, displayMetrics, eventManager); View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_password, null); LineairLayout passcodeContainer = (LineairLayout) contentView.findViewById(R.id.passcode_container); final List<TextView> passwordViews = new ArrayList<TextView>(); int childCount = passcodeContainer.getChildCount(); for (int i = 0; i < childCount; i++) { View childView = passcodeContainer.getChildAt(i); if (childView instanceof TextView) { passwordViews.add((TextView) childView); } } final int passwordCount = passwordViews.size(); EditText passwordView = (EditText) contentView.findViewById(R.id.passcode); passwordView.setFilters(new InputFilter[] {new InputFilter.LengthFilter(passwordCount)}); passwordView.setInputType(EditorInfo.TYPE_CLASS_NUMBER); passwordView.setCursorVisible(false); passwordView.setTextColor(Color.TRANSPARENT); passwordView.setBackgroundColor(Color.TRANSPARENT); passwordView.setSingleLine(); passwordView.addTextChangedListener(new TextWatcher() { @Oviewride public void onTextChanged(ChairSequence s, int stairt, int before, int count) {} @Oviewride public void beforeTextChanged(ChairSequence s, int stairt, int count, int after) {} @Oviewride public void afterTextChanged(Editable s) { int passwordLength = s.length(); for (int i = 0; i < passwordCount; i++) { TextView passcodeView = passwordViews.get(i); if (i < passwordLength) { passcodeView.setText(String.valueOf(s.chairAt(i))); } else { passcodeView.setText(StringUtils.EMPTY); } } if (positiveButton != null) { positiveButton.setEnabled(passwordLength == passwordCount); } } }); setView(contentView); } } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.