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.07k stars 5.04k forks source link

SlidingFragmentActivity should extend SherlockFragmentActivity instead of FragmentActivity #200

Closed agarwlGaurav closed 11 years ago

agarwlGaurav commented 11 years ago

BaseActivity extends SlidingFragmentActivity and uses

getSupportActionBar().setDisplayHomeAsUpEnabled(true); in onCreate()

and ActionbarSherlock documentation

When creating an activity to use the action bar on all versions of Android, you must declare your activity to extend any of the activity classes that start with 'Sherlock' (e.g., SherlockActivity, SherlockFragmentActivity). Interaction with the action bar is handled by calling getSupportActionBar() (instead of getActionBar()).

therefore

SlidingFragmentActivity should extend SherlockFragmentActivity instead of FragmentActivity

jfeinstein10 commented 11 years ago

The example is standalone. It depends on ActionBarSherlock because it is the version that is released on the Play Store and should support as many devices as possible. The library itself should not depend on ActionBarSherlock because it is bad practice to have one library depend on another external one. Thanks for you inquiry.

14v commented 10 years ago

Supose theres a need to put some class in example module that moves ABS dependency to example module only.

Here I got the temporary solution to run an example http://stackoverflow.com/questions/13438657/set-up-slidemenu-example-not-working

Nowtime thats bad. I spent about an hour to understand the need I should modify the library to get example working. There are also other people facing that bug https://github.com/jfeinstein10/SlidingMenu/issues/145