How to configure Sherlock’s action bar + map plugin?

Since it takes me a long time to integrate the Sherlock action bar in my Android project (with its map plugin!), I propose to portray my solution here.

+4
source share
1 answer

The first step is to create a library project, the second to create your own project that will use the action bar, and the third step allows you to use the map plugin.

I - ActionBar SHerlock Project:

  • download actionbarSherlock zip file
  • Import existing Android code into Workspace (for ActionBar 4.2.0). Select the library directory to import. The project "Library" has been created.
  • set the manifest using "android: minSdkVersion =" 7 "android: targetSdkVersion =" 16 "
  • Import compatibility library: right-click on the project> Android Tools> Add Support Library
  • configure this project with the following project properties:

    • Android build target:> = android 4.0
    • check library

II - Your project:

  • create your own project that uses the Action Bar control panel
  • install Android Build Target on> = Android 4.0 (choose the same goal than the previous project!)
  • set the manifest using "android: minSdkVersion =" 7 "android: targetSdkVersion =" 16 "
  • add the previous project "ActionBarSherlock" as a library: Project> Properties> Android> Add ... (bottom panel)
  • Modify your code to use ActionBar classes

III - Use the actionbarsherlock-plugin-maps-4.1.0.jar plugin in the Sherlock Action Bar:

  • add actionbarsherlock-plugin-maps-4.1.0.jar (obtained from the zip file) to the "ActionBarSherlock" project in the libs directory
  • configure the project: project> properties> build path> Librairies:

    - add actionbarsherlock-plugin-maps-4.1.0.jar 
  • set the build target in the Google Maps API> 4.0 (do the same for your project - the same goal!)

  • add the actionbarsherlock-plugin-maps-4.1.0.jar library to the path for creating new projects.

Hope it works for you too.

+6
source

All Articles