开发者

Activity launches transparent Overlay Activity. How to pass Data without closing the Overlay?

in my app i am having an Activity that launches another Activity ontop of it. The second Activity is meant to provide controls like next and previous for the first activity. How can i pass button events between the two activit开发者_运维问答ies that are visible at the same time without closing the Activity with the controls?


You can send Broadcast in order to communicate between Activities.

In parent Activity register BroadcastReceiver, then send a Broadcast by calling sendBroadcast(..) in child Activity.


It sounds like what you are trying to do doesn't require two activies, but rather additional view objects on the main activity that will be shown/hidden/removed/added as buttons on this activity are pressed.

If you need additional help, I would recommend elaborating on your original post.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜