Monday, April 16, 2012

Android - How can I prevent view focus changes?

I´d like to implement something like a "beforeLosingFocus" event to my controls (EditText) and I want to be able to prevent the focus changes so my control must have the focus until the user type allowed values.



I tried to use onFocusChange event but this event is fired after the focus changes.
This event is fired two times (because one control lost the focus while another control get it).



Is possible to prevent that another control get the focus in a generic way?
(because the focus can change by a tap in another control or a "Next" key click)





No comments:

Post a Comment