Android Click EditText always does not eject the software keyboard
Scene Description: Under normal circumstances, when clicked EditText, the soft keyboard will bounce out. Now the requirement is when clicking EditText, the Bounce Date selection dialog box, the selected results are displayed on the EditText. If not handled, when clicked EditText, Soft Keyboard and dialog box will pop up, obviously users will feel uncomfortable.
Solution, when clicked EditText:
1, store the current input type
2, set input type for inputtype.type_null, no mobile phone soft keyboard
3, restore the original input type, because this operation is finished, but also to allow users to modify.
4, Pop-up Date selection dialog box, after the operation of the results displayed to the EditText.
Hide the software disk, the code is as follows:
EditText et_start_time = (edittext) This.findviewbyid (r.id.et_start_time);
int intype = Et_start_time.getinputtype ();
Et_start_time.setinputtype (inputtype.type_null);
Et_start_time.ontouchevent (event);
Et_start_time.setinputtype (intype);
Et_start_time.setselection (Et_start_time.gettext (). Length ());
Thank you for reading, I hope to help you, thank you for your support for this site!