最近我听到了使用操作栏来管理应用程序中的用户操作和导航的建议。
然而,要实现这一点并让我的应用程序与较低版本兼容,我必须使用 actionbarsherlock,我还必须更改一些主题,所以我想到:所有这些看起来都需要付出很多努力,但我可以只需根据需要向我的 Activity 布局添加自定义 View 即可。
使用 action bar 在性能或其他方面有真正的好处吗?
最佳答案
我认为更多的是关于用户体验。操作栏使界面在应用程序之间保持一致。这是来自 developer.android.com 的引述
"You should use the action bar in most activities that need to prominently present user actions or global navigation, because the action bar offers users a consistent interface across applications and the system gracefully adapts the action bar's appearance for different screen configurations".
开发者网站还说 the primary goals of the action bar are to:
- 提供专用空间来识别应用程序品牌和用户位置。
- 在不同的应用程序中提供一致的导航和 View 优化。
- 让 Activity 的关键操作(例如“搜索”、“创建”、“分享”等)以可预测的方式突出显示并可供用户访问。
关于Android - 在 View 上使用 actionbar 的好处?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17096250/