jfeinstein10 / SlidingMenu

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!
Apache License 2.0
11.08k stars 5.04k forks source link

Examples don't work #145

Closed akex31 closed 11 years ago

akex31 commented 11 years ago

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 :

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 !

jfeinstein10 commented 11 years ago

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 :)

jtehlert commented 11 years ago

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();

sergiocarabantes commented 11 years ago

Same problem!. I can't compile the example

jfeinstein10 commented 11 years ago

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

akex31 commented 11 years ago

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.

vanezkw commented 11 years ago

I also have the same problem.

ghost commented 11 years ago

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

vishwasdoth commented 11 years ago

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

waiwu9292 commented 11 years ago

Hello,

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

jd-alexander commented 11 years ago

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

michaelye commented 11 years ago

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.

lx3h commented 11 years ago

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

pamio commented 11 years ago

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.

lx3h commented 11 years ago

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

lakkad-amish commented 11 years ago

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.

pamio commented 11 years ago

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 :)

frodberserk commented 10 years ago

awesome work :+1 :)

frodberserk commented 10 years ago

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. :)

yangyao88 commented 10 years ago

up is the solved method...

srnaik commented 10 years ago

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