我希望当您按TAB键移动到下一个EditText时。 目前只添加空白,我正在使用Android 2.3
任何人都知道吗?
谢谢!
答案 0 :(得分:0)
这就是我解决的问题:
private class GenericTextWatcher implements TextWatcher{
private View view;
private GenericTextWatcher(View view) {
this.view = view;
}
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
switch(view.getId()){
case R.id.txt_checklocation_location:
if (txt_checklocation_location.getText().toString().endsWith("\t"))
txt_checklocation_location.focusSearch(View.FOCUS_DOWN).requestFocus();
break;
}
}
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
public void afterTextChanged(Editable editable) {}
}