i encountered the same problem, while implementing time and date pickers. following code did it for me
timePicker.setInputType(InputType.TYPE_NULL);
but then you would have to click twice to make the time picker dialog appear. so add
timePicker.setFocusable(false);
and everything should work as expected.