Here is what worked for me
Set editable to false
<EditText android:id="@+id/dob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="Date of Birth"
android:inputType="none"
android:editable="false"
/>
Then add an event listener for OnFocusChange
private View.OnFocusChangeListener onFocusChangeDOB= new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus){
showDialog(DATE_DIALOG_ID);
}
}
};