如何在android中使用页眉和页脚
我正在 Android 中开发一个应用程序,其中我需要整个应用程序的页眉和页脚同时在不同的活动之间切换。在活动之间切换时,页眉和页脚文本将发生变化。实现这种方法的最佳方法是什么?实际上标题会显示应用程序的导航。
I am developing an app in android in which I need a header and footer through out app while switching between different activities. The header and footer text will change while switching between activities. What would be the best way to achieve this approach? Actually the header will show navigation of app.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这对于单独的活动是不可能的,抱歉。
This is not possible with separate activities, sorry.
您可以重新创建 TabActivity 的功能吗?因此,您将在“raiActivity”中加载您的活动,并且您将拥有页眉和页脚,而不是各种选项卡。
查看 ActivityGroup 来了解这一点
You could recreate what a TabActivity does? So you'll load your activities in your "raiActivity", and instead of having various tabs, you'll have a header and footer.
Check out ActivityGroup for this
可以与
,但我不知道如何向你解释。谷歌搜索片段甚至框架布局教程,你会得到你想要的。这是我对此类问题最接近的回答。
May work with
but i don't know how to explain it to you. Google search tutorials for fragments and even frame layout maube you get what you want. This was the closest i got to answer my questions about something like that.