简体   繁体   English

android tabhost如何在tabhost内启动新活动

[英]android tabhost how to launch new activity inside the tabhost

I have a Tabhost which is my main activity. 我有一个Tabhost,这是我的主要活动。 When a tab is clicked you will see the activity inside the Tabwidget. 单击选项卡后,您将在Tabwidget中看到活动。 In the inside activity i have this button which launch a new intent. 在内部活动中,我有一个启动新意图的按钮。 Is there a way that this intent can be launch in the same Tabhost and Tabhost widget? 是否可以在同一Tabhost和Tabhost小部件中启动此意图? I want it to look the same and still to be with the Tabhost in the view.. 我希望它看起来相同,并且仍然与视图中的Tabhost在一起。

check this link out on TabGroupActivity and see how it works. 在TabGroupActivity上查看此链接,并查看其工作方式。 This will display your tabs in whatever activity you launch.This should solve your problem. 这将在您启动的任何活动中显示您的选项卡,这应该可以解决您的问题。 http://androidmaterial.blogspot.in/2011/04/how-to-us-tab-group-activity-in-android.html http://androidmaterial.blogspot.in/2011/04/how-to-us-tab-group-activity-in-android.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM