如何建立固定的导航栏的所有活动在Android应用程序 [英] How To Create Fixed Navigation Bar For All Activities In An Android Application

查看:225
本文介绍了如何建立固定的导航栏的所有活动在Android应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置一个导航栏(有两个按钮和一个TextView)共同为我的应用程序的所有活动。我知道它可以通过包含一个共同的布局文件到每个活动的布局文件来完成。但是,我必须使用幻灯片切换动画,当活动的变化到另一个。现在,如果我按照流程,包括公共布局文件,然后在导航栏也将在或不与活动的看法,我想,当活动或缩小查看幻灯片固定我的导航栏滑动。此外,导航栏的两个按钮应设为我可以用code到一些活动隐藏它们。所以,现在我需要帮助严重的问题,请给我上problem.Thanks的解决方案/建议/线索事先.....

i want to set a navigation bar ( with two buttons and a textview ) common for all activities of my application. I know it can be done by including a common layout file into each activity's layout file. But i have to use slide transition animation when a activity changes to another. Now if i follow the common layout file including process, then the navigation bar will also slide in or out with the activity's view where i want my navigation bar to be fixed when activities view slides in or out. Besides, the two buttons of the navigation bar should be set as i can hide them by using code to some activities. So now i need help badly on the problem, please give me a solution/suggestion/clue on the problem.Thanks in advance .....

推荐答案

片段可能是你在这种情况下找什么。

Perhaps Fragments may be what you are looking for in this scenario.

或者想进一步,也许 ViewFlipper ,提供多种布局也可以帮助在这种情况下。

Or thinking about it further maybe ViewFlipper with multiple layouts could also help in this case.

这篇关于如何建立固定的导航栏的所有活动在Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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