📌  相关文章
📜  android如何判断编辑文本焦点是否改变 - Java代码示例

📅  最后修改于: 2022-03-11 14:52:41.583000             🧑  作者: Mango

代码示例1
for (EditText view : editList){
   view.setOnFocusChangeListener(focusListener);
}
....
private OnFocusChangeListener focusListener = new OnFocusChangeListener() {
    public void onFocusChange(View v, boolean hasFocus) {
        if (hasFocus){
             focusedView = v;
        } else {
             focusedView  = null;
        }
    }
}