How to make EditText have an onClick event so that with a single click the action is executed.
private void addListenerOnButton() {
dateChanger = (EditText) findViewById(R.id.date_iWant);
dateChanger.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
showDialog(DATE_DIALOG_ID);
}
});
}
this does not work as excluded .... one click gives only the on-screen keyboard, but not the datepicker dialog, which appears only if I double-clicked
user1381180
source
share