Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SlidingMenu Library with ActionBarSherlock

In the documentar from SlidingMenu is written down:

Go into the SlidingActivities that you plan on using make them extend Sherlock__Activity instead of __Activity.

The setup should be ok, I followed the guide, but if I try to extend my Activity with for example: SlidingSherlockFragmentActivity or SherlockSlidingFragmentActivity doesn't work.

If I extend my Activity with SherlockFragmentActivity I can't get the SlidingMenu with getSlidingMenu() or call setBehindContentView.

like image 396
Leandros Avatar asked Nov 09 '12 14:11

Leandros


2 Answers

Nevermind, go into the SlidingMenu library and extend the Activity by SherlockFragmentActivity instead of FragmentActivity

like image 189
Leandros Avatar answered Oct 28 '22 00:10

Leandros


Go to activities of library SlidingMenu and extends all activities to SherlockActivities corresponding, after go to your app and extends all activities to SlidingActivity corresponding.

Example: SlidingMenu:

SlidingActivity extends SherlockActivity
SlidingMapActivity extends SherlockMapActivity

Example: MyClass

MyClass extends SlidingActivity
MyClass extends SlidingMapActivity
like image 2
Pierry Avatar answered Oct 28 '22 00:10

Pierry