【发布时间】:2019-06-20 21:51:42
【问题描述】:
下面是我编写的用于将焦点从一个编辑文本转移到另一个的代码,但是我在这个实现中遇到的问题是,焦点移动到特定的编辑文本,然后突然移动到下一个编辑文本。所以,我无法输入任何内容,因为焦点根本不在于特定的编辑文本..
//some code comes here
// gun_pistolNotes and gun_pistolModel are two diff. editText
......
......
gun_pistolNotes.setOnEditorActionListener(new OnEditorActionListener(){
@Override
public boolean onEditorAction(TextView view,int actionId, KeyEvent event){
if(actionId == EditorInfo.IME_ACTION_UNSPECIFIED){
gun_pistolModel.requestFocus(); // moves to this edittext and suddenly moves to another editext
return true;
}
return false;
}
});
......
......
//some code comes here
感谢任何帮助。
【问题讨论】:
标签: android android-edittext android-view