In my application in android are many EditText fields. And I ran into a problem with hint. It is not disappearing when EditText is focused, but it disappears when I start to
Here i have used the little bit of code to hide and show hint may be it'll be helpful.
txt_username.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if(txt_username.getText().toString().isEmpty()){
if(hasFocus){
txt_username.setHint("");
}else{
txt_username.setHint(R.string.username);
}
}
}
});