EditText focus state listener event

Sometimes we need to monitor the focus state of EditText, we can call the following method to handle the event:

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325682060&siteId=291194637