如何在 tabhost 和新活动之间进行通信
我刚刚在我的 Android 应用程序中遇到了问题。我的 tabhost 中有五个选项卡,可以容纳五项活动。如果其中一个活动跳转到另一个活动(不在 tabhost 中),则 tabhost 丢失,但我希望所有活动都显示在 tabhost 中。
我该如何做到这一点以及如何在 tabhost 中的两个活动之间获取/放置数据?
I just encountered a problem in my android application. There are five tabs in my tabhost, which can hold five activities. If one of them jumps to another activity (not in tabhost), the tabhost is missing, but I want all of my activities to display in tabhost.
How can I do this and how do I get/put data between two activities in tabhost?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 TabHost 内使用 ActivityGroup 来实现此目的(即内容单个选项卡显示的是一个 ActivityGroup)
You could use an ActivityGroup inside your TabHost to achieve this (i.e. the content shown for an individual tab is an ActivityGroup)