以EditText为例
1.改变焦点状态
password.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
// TODO Auto-generated method stub
Toast.makeText(MainActivity.this, String.valueOf(hasFocus),1).show();
}
});
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-11-02 15:01:52