OnFocusChanged is called twice: Once for when the EditText is brought into focus, and once when it loses focus.
So when you click on an EditText, it makes a toast. Then when you click on another EditText, the first one loses focus, which shows the first toast again, and then the second one gains focus, which shows your second toast.
If you only want to show the toast when it is selected, try using:
heure.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View arg0, boolean arg1) {
datee.removeTextChangedListener(yourTextWatcher);
if(v.isFocused()) {
Toast.makeText(RendezVousActivity.this,"heure", 5000).show();
}
}
});
datee.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
heure.removeTextChangedListener(yourTextWatcher);
if(v.isFocused()) {
Toast.makeText(RendezVousActivity.this,"Date", 5000).show();
}
}
});