开发者

Android Update layout/view

I have a view within a tabgroup, I usually pop unused views off the stack when I go to the next view but in this one particular case I don't.

I want th开发者_如何学运维e original view to update when I finish() the new view, but neither onCreate or any of the lifecycle methods are called is it fully rendered within the tab.

How would I simply update that one individual view. If I called the tab itself, it will show a completely separate and irrelevant view because of the order of the UX

insight appreciated


I find it interesting onResume is never called, I'm guessing the view is always visible while these other actions are happening?

In this case I would probably use a broadcast and set up a receiver in the activity you want to repsond to the change. When something happens you can just send the broadcast.

Here is a pretty basic example: http://www.androidsnippets.com/how-to-set-up-a-broadcastreceiver-intent

You will probably want to register and unregister the listener based you apps lifecycle.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜