Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I capture when time changes in a TimePicker if the "Soft" Keyboard is being used?

Continuing with the question referred in the following link:

How can I capture when time changes in a TimePicker if the keyboard is being used?

I could solve the problem but it only works when you use the actual keyboard. If you use the soft keyboard I can't get it to work.

I am programming in 1.6 version of the framework.

Any help will be much appreciated.

PS: The fact that I've search everywhere for the answer and have not been able to find it tells me that this must be so very simple or very much complicated. Help?!

like image 556
monn3t Avatar asked Aug 12 '10 04:08

monn3t


1 Answers

Referring to the comment from Cody, you need to remove focus from the TimePicker when the dialog is closed.

You can use this, where tp is the TimePicker instance:

   public void onDialogClosed(boolean positiveResult) {
   tp.clearFocus();
like image 162
SoftWyer Avatar answered Sep 29 '22 22:09

SoftWyer