How to “install” Action Bar Sherlock?

夙愿已清 提交于 2019-12-05 01:30:35
Elad92

Didn't heard about Compatibility library that contains action bars, I've downloaded the last one few days ago. Anyway, it's very simple, unzip the file IN(!!) your workspace, then create new android project, and choose "Create project from existing source", then choose the "library" folder in the folders you've just unzipped.

Right click on the action bar sherlock project, properties > android > check "Is Library". Then right click on your project, properties > android > change the target SDK to 3.2 (API 13), and press add library and choose the sherlock library.

You change your project to 3.2 so the sherlock can work, but you can still use it down to 1.6, just write in your manifest this line:

<uses-sdk android:minSdkVersion="4"
              android:targetSdkVersion="13" />

And be careful not to use API 13 code in your app.

I wrote this really fast so if you don't understand me feel free to ask, and if you still don't understand you can look at their web in FAQ there's a video that explains how to use it, step by step.

Good luck!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!