"We human being, always find a solution, maybe not today, but if you really want to solve a problem, there’s always a way" – Ma Yun @ Stanford, 2013

Integrating ActionBarSherlock (by Jake Wharton) and SlidingMenu (by Jeremy Feinstein) into projects

by Md Imran Hasan Hira

Download ActionBarSherlock frome here and SlidingMenu from here.

After downloading ActionBarSherlock, you’ll find Action Bar Sherlock main project in “actionbarsherlock” directory. Import this project in eclipse. And from SlidingMenu repository, import “library” ( SlidingMenu  ) and “example” ( SlidingMenuExample ) as android projects to eclipse.
From SlidingMenu project properties, refer ActionBarSherlock project as a library project. And in the project properties of the example project add both ActionBarSherlock and SlidingMenu as library projects.

While running SlidingMenu Example I faced two main errors integrating them.

1.

Jar mismatch! Fix your dependencies
or
All versions of the libraries must be the same at this time.

If you got this type of error because of android support library, then remove android support libraries from the “SlidingMenu/library/libs” and other projects ( i.e. SlidingMenuExample) that uses ActionBarSherlock.

 

2.

The method getSupportActionBar() is undefined for the type BaseActivity

To solve this problem, Open SlidingMenu project and there make the class “SlidingFragmentActivity” to extend “SherlockFragmentActivity” instead of “FragmentActivity” . Then clean and build SlidingMenu project and other depending projects.

 


Leave a Reply

Your email address will not be published. Required fields are marked *

Theme by Ali Han | Copyright 2025 Md Imran Hasan Hira | Powered by WordPress