EditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if(hasFocus){//获得焦点
}else{//失去焦点
}
}
});
@Override
public void onFocusChange(View v, boolean hasFocus) {
if(hasFocus){//获得焦点
}else{//失去焦点
}
}
});