Android TabHost inside Fragment(片段内的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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:片段内的Android TabHost
基础教程推荐
- NSString intValue 不能用于检索电话号码 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
