You can use a TextWatcher, as the user goes typing you go checking the length of the string, when you reach the length limit you change the focus to another edittext.
public class YourClass extends Activity {
private EditText yourEditText;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
yourEditText = (EditText) findViewById(R.id.yourEditTextId);
yourEditText.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s) {
// you can call or do what you want with your EditText here
SE tamanho = tamanhoLimite ENTAO
muda o foco
FIMSE
}
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
public void onTextChanged(CharSequence s, int start, int before, int count) {}
});
}
}
You can take a look at this other topic here, which is where I took the code snippet above: link