SlidingMenu icon indicating copy to clipboard operation
SlidingMenu copied to clipboard

Examples don't work

Open akex31 opened this issue 14 years ago • 21 comments

Hi, I would like to use your library for my project as it seems great and meet my need.

I can't compile the examples provided because i have the following errors :

  • getSupportActionBar() is undefined
  • a few methods like onOptionsItemSelected() can't be override.

My ABS is working fine (and i version 4.2.0) and i had no trouble to set up the slidemenu library.

For ABS, slidemenu and the examples, i set a minsdk to 7 and target 17. I use JRE6.

Thanks for helping !

akex31 avatar Nov 21 '12 10:11 akex31

Go into slidingFragmentActivity and make it extend SherlockFragmentActivity. That should be the only thing you needed. Other than that you can always download the example from the Play Store :)

jfeinstein10 avatar Nov 21 '12 15:11 jfeinstein10

Having the exact same problem. Changed the activity to SherlockFragmentActivity, but that just causes problems with these being "undefined for BaseActivity": setBehindContentView(R.layout.menu_frame); SlidingMenu sm = getSlidingMenu(); toggle();

jtehlert avatar Nov 23 '12 03:11 jtehlert

Same problem!. I can't compile the example

sergiocarabantes avatar Dec 02 '12 22:12 sergiocarabantes

So to reiterate, your version of SlidingFragmentActivity extends SherlockFragmentActivity, correct?

jfeinstein10 avatar Dec 03 '12 07:12 jfeinstein10

The solution "Go into slidingFragmentActivity and make it extend SherlockFragmentActivity" has worked for me ! And so for the library is working great for me.

Thanks.

akex31 avatar Dec 03 '12 07:12 akex31

I also have the same problem.

vanezkw avatar Jan 22 '13 08:01 vanezkw

Thanks guys. It solved my problem. Just don't forget to import com.actionbarsherlock.app.SherlockFragmentActivity; or just simple hit Cmd+Shift+O :).

ghost avatar Mar 01 '13 18:03 ghost

Can I user Sliding Menu with my custom ActionBar layout? I am using ABS.

vishwasdoth avatar Mar 12 '13 10:03 vishwasdoth

Hello,

How can I just take your content only sliding menu bar?

waiwu9292 avatar Mar 14 '13 15:03 waiwu9292

I am having the same error as defined by jtehlert. I extended the slidingFragmentActivity to SherlockFragmentActivity, the error is still present.

jd-alexander avatar Mar 25 '13 20:03 jd-alexander

I have the same problem,and I fixed it by making com.slidingmenu.lib.app.SlidingFragmentActivity.java extends SherlockFragmentActivity,then you will get the error tip: "SherlockFragmentActivity cannot be resolved to a type".So just add the ActionBarSherlock's library for the slide_menu_library,then import correct package.Next add the slide_menu_library for the demo or your project.At last,clean the projects.

michaelye avatar Apr 12 '13 09:04 michaelye

Nothing is working for me after changing to "SherlockFragmentActivity".

lx3h avatar Jun 29 '13 17:06 lx3h

I'm facing the same problem. I've tried above mentioned solutions but nothing worked out for me. I still have the problem and have found no solution yet.

pamio avatar Aug 30 '13 13:08 pamio

Hi Pramod,

I've this video which helped me out. Give it a go.

https://www.youtube.com/watch?v=7Efi_4ajfOM&feature=youtube_gdata_player

Good luck!

Cheers, Locky

Sent from Yahoo! Mail on Android

lx3h avatar Aug 30 '13 23:08 lx3h

I'm facing the same problem.but i didnt got any solution. error : he method getSupportActionBar() is undefined for the type BaseActivity Please help me i am new to this libraries.i always use my custom tabs.

lakkad-amish avatar Sep 16 '13 07:09 lakkad-amish

I resolved the issue. @payraj143 .. Did you include the library properly, also did u do clean after that. My problem was that I did not extend it from SherlockFragmentActivity. You could follow the video mentioned in @lx3h's reply. That should do :)

pamio avatar Sep 16 '13 07:09 pamio

awesome work :+1 :)

frodberserk avatar Dec 10 '13 13:12 frodberserk

Import the actionbarsherlock library to sliding menu library. Then in SlidingFragmentActivity, extend it from Fragment activity to SherlockFragmentActivity. Clean it. Then in your project, import only Sliding Menu library. No need to import ActionbarSherlock library again. Also, make sure that you have same v4 support library in both acrtionbarsherlock and sliding menu libraries. :)

frodberserk avatar Dec 10 '13 13:12 frodberserk

up is the solved method...

DongyangYao666 avatar Apr 16 '14 10:04 DongyangYao666

Whatever frodberserk has mentioned is absolutely correct :-). Thank you :+1:

srnaik avatar Aug 20 '14 13:08 srnaik