如何保持动作条固定在所有的活动? [英] How to keep actionbar fixed across all activities?

查看:156
本文介绍了如何保持动作条固定在所有的活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Facebook的应用程序V2.3,当你从一个活动(或frgament?)到另一个导航,在动作条保持固定在所有活动(或片段?)。例如,如果您从您浏览新闻源添加到某人的个人资料页面,则操作栏保持不变,和下面的页面被刷新。所以我的问题是,是否有可能有只使用活动这种行为?或者我应该有一个主要活动,和片段的所有子活动?

In the Facebook app v2.3, when you navigate from one activity(or frgament?) to another, the actionbar stays fixed across all activities(or fragments?). For example, If you navigate from you news feed to someone's profile page, then the action bar stays constant, and the page below is refreshed. So my question is, is it possible to have this behavior using only activities? Or should i just have one main activity, and fragments for all sub activities?

推荐答案

一项活动,并尽可能多的片段,你所需要的。

One activity and as many fragments as you need.

您拨打的那一刻 startActivity(意向); 框架将推出该活动的过渡动画及其所有内容(包括行动起来吧)

the moment you call startActivity(intent); the framework will roll the activity transition animation with all its contents (including the action bar)

这篇关于如何保持动作条固定在所有的活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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