将 ActionBar 添加到 Android API Level 8 应用程序?
我知道互联网上有很多关于如何做到这一点的零散材料,但我请求有人给我一个逐步指南,告诉我如何从一开始就如何添加库,将代码添加到我的 Android 应用程序/项目。
我喜欢这个的外观: https://github.com/johannilsson/android-actionbar 但我无法得到它正常工作:/我有一种感觉我错过了一些东西。
我的应用程序适用于 Android 版本 2.2。
I know there is a lot of fragmented material on how to do do this all over the internet but I am requesting someone to please give me a step by step guide on how to go from the very beginning, adding the library to adding the code into my Android application / project.
I like the look of this one: https://github.com/johannilsson/android-actionbar but I cannot get it to work properly :/ I have a feeling I'm missing something.
My Application is for Android version 2.2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我编写了 ActionBarSherlock,它是兼容性库的扩展,旨在提供单个操作栏 API,该 API 既可以与 3.0 之前的设备上的本机实现一起使用,也可以与 3.0 以后的设备上的本机 ActionBar 一起使用。这将允许您编写低至 Android 1.6 至 Android 4.0+ 的应用程序,而不必担心实现之间的混乱。该库负责跨 Honeycomb 鸿沟应用您的 API 调用和主题。
您可以在 http://actionbarsherlock.com 上找到更多信息,例如示例应用程序和文档。
I wrote ActionBarSherlock which is an extension of the compatibility library designed to provide a single action bar API which works both with a native implementation on pre-3.0 devices as well as with the native ActionBar on post-3.0. This will allow you to write apps which work as low as Android 1.6 and up through Android 4.0+ without having to worry about shuffling between implementations. The library takes care of applying your API calls and theme across the Honeycomb divide.
You can find more information on http://actionbarsherlock.com such as sample applications and documentation.
ActionBar现已在支持库中!
查找官方文档这里。
以及此处的视频介绍,介绍如何使用它。
The ActionBar is in the Support Library now!
Find the official documentation here.
And a video introduction about how to work with it here.