片段内的Android TabHost [英] Android TabHost inside Fragment

查看:20
本文介绍了片段内的Android TabHost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 Android 应用程序,并且我使用了 android FragmentPager 选项卡 example 来自 developer.android.com),这个例子使用标签内容的片段,现在我想在其中一个片段中放置一个 tabHost,我已经尽力了,但是第二个选项卡主机没有显示内容,我可以看到选项卡标题但没有内容,我正在尝试将 Intents 用作 TabContent.我不认为我有任何相关的代码可以在这里发布,但是如果你需要我可以在这里发布.

I am working on an Android App and I have used android FragmentPager tabs example from developer.android.com), this example uses fragments for tabs contents, Now I want to place a tabHost inside one of those fragments, I have tried my best but the second tab hosts are not showing the content, I can see tab headers but no content, I am trying to use Intents as TabContent. I don't think I have any relevant code to post here, but If you need I can post it here.

层次结构是:FragmentActivity->TabHost->Fragments->TabHost->(Intent or Fragment,这是问题区域)

The hierarchy is: FragmentActivity->TabHost->Fragments->TabHost->(Intent or Fragment, this is the problem area)

任何建议将不胜感激.

推荐答案

你看到了吗?参考了几次,应该可以帮到你.

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/

这篇关于片段内的Android TabHost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆