I've seen older posts and all the answers suggest to clearFocus.
I can't do that, because my TimePicker isn't inside a dialog, so I don't know when I should call clearFocus() function and probably it will crash my app if I would try to modify TimePicker after.
I'm sure this problem has a solution because the Alarm app which comes with Android do this feature without a dialog.
Any answer is welcome, Regards!
You should use TimePicker.OnTimeChangedListener to handle onTimeChanged action if the user has changed hours or minutes values by tapping on plus or minus, or by editting the time manualy using keyboard.
And this is my code:
Activity:
Layout:
Hope, it will help you!