I've got a number picker in my activity. It's possible for the user to do a text selection on the current number. The problem is I'd like to reset the selection when the orientation change to avoid the change of the action bar. As extreme solution I could disable selection but I don't know how. I tried to call clearFocus, I tried to set empty longClikListner, I tried to set setSelected(false) and so on. How can I reset a text selection?
I post the solution after a lot of work :) Use a dummy layout element with focus, clear the focus from the number picker and request the focus from your dummy element, but you have to do this in onResume and onPause.