selfstarter

How to automatically move edit text in android 본문

App/Android

How to automatically move edit text in android

selfstarter 2020. 3. 4. 12:42

How to automatically move edit text in android

firstEdit to secondEdit
mSecondEdit.requestFocus();


private TextWatcher textWatcher = new TextWatcher() {
    @Override
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
    }

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

    @Override
    public void afterTextChanged(Editable s) {
        if (mFirstEdit.getText().length() >= EDIT_MAX_LEN) {
            mSecondEdit.requestFocus();
        }
    }
};
Comments