EditText焦点状态监听事件

来源:互联网 发布:移动网络上h网解决办法 编辑:程序博客网 时间:2024/06/05 08:46

有时候我们需要监听EditText的焦点状态,可以调用下面的方法处理事件:

holder.etNum.setOnFocusChangeListener(new View.OnFocusChangeListener() {            @Override            public void onFocusChange(View v, boolean hasFocus) {                if(hasFocus){                    checkFocusInterface.editTextHasFocus(position,v,hasFocus);                }            }        });

原创粉丝点击