final EditText qita_juankuan = (EditText) findViewById(R.id.new_hequnjuankuan_qitayuan);
qita_juankuan.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
// TODO Auto-generated method stub
EditText _v=(EditText)v;
if (!hasFocus) {// 失去焦点
_v.setHint(_v.getTag().toString());
} else {
String hint=_v.getHint().toString();
_v.setTag(hint);
_v.setHint("");
}
}
});
qita_juankuan.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
// TODO Auto-generated method stub
EditText _v=(EditText)v;
if (!hasFocus) {// 失去焦点
_v.setHint(_v.getTag().toString());
} else {
String hint=_v.getHint().toString();
_v.setTag(hint);
_v.setHint("");
}
}
});