Android TabHost inside Fragment

南笙酒味 提交于 2019-11-30 13:29:05

Have you seen this? I've referenced it a few times, should help you out.

http://thepseudocoder.wordpress.com/2011/10/04/android-tabs-the-fragment-way/

Now you can use FragmentTabHost

This can also be used inside of a fragment through fragment nesting

http://developer.android.com/reference/android/support/v4/app/FragmentTabHost.html

I face the same problem we. We cannot open a fragment or activity in another tab.(We an but it will open in the same tab). So i am use to the below code to change the tab.

 MainActivity.tabHost.setCurrentTab(tabIndex);

Its open the tab with the main tab page.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!