0

How to Transfer focus in next edit text automatically when first edit text input is greater then 4 digits? And how to go back again on first edit text when next edit text data is deleted?

AmeeJoshi
  • 201
  • 2
  • 14
  • http://stackoverflow.com/questions/3019965/keycode-enter-to-next-edittext – Raghunandan Jul 16 '13 at 06:12
  • Welcome to SO. I would recommend showing any research you have done as well as any attempts you have made to solve your problem. You will be a whole lot more likely to receive responses if you do so. – Enigmadan Jul 16 '13 at 06:33

1 Answers1

1
edittext1.addTextChangedListener(new TextWatcher() {

public void onTextChanged(CharSequence s, int start, int before,
        int count) {

        if(editText.getText().toString().Length()>=4)
           {
              editText2.requestFocus();
           }
}
});
Ankur
  • 5,086
  • 19
  • 37
  • 62
Imran
  • 39
  • 9