Android: Detect when a Widget has gained/lost focus
What's the best way to detect when a Home Screen Widget has gained 开发者_JAVA百科or lost focus? An example of losing focus is if the user navigates to another screen or if another screen popped up in front of the Widget.
From what I've seen of widgets there's no way of getting this sort of information.
Perhaps the best advice I could give is to come up with a way of doing what you need without this sort of information.
What is the reason you're trying to do it?
精彩评论