Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android, is there any way to disable writing inside a date picker using keyboard?

Is there any way to disable writing inside a date picker using keyboard? As I just want the plus and minus signs to be used to set the date. thanks in advance.

like image 808
Android Developer Avatar asked Nov 20 '12 10:11

Android Developer


2 Answers

myDatePicker.setDescendantFocusability(DatePicker.FOCUS_BLOCK_DESCENDANTS);
like image 106
Tkingovr Avatar answered Oct 05 '22 02:10

Tkingovr


dp.setDescendantFocusability(DatePicker.FOCUS_BLOCK_DESCENDANTS);

is the best way to do so.

You can check this also

Focusable EditText inside ListView

like image 33
Rand Halim Avatar answered Oct 05 '22 03:10

Rand Halim