I want an EditText which creates a DatePicker when is pressed. So I write the following code:
mEditInit = (EditText) findViewById(R.id.date_init);
mE
Default working of EditText
:
On first click it focuses and on second click it handles onClickListener
so you need to disable focus. Then on first click the onClickListener
will handle.
To do that you need to add this android:focusableInTouchMode="false"
attribute to your EditText
. That's it!
Something like this: