I have an activity which must extends from another activity, so i cannot embed the SlidingMenu at the Activity level. from https://github.com/jfeinstein10/SlidingMenu i learned that i should call SlidingMenu.attachToActivity(Activity activity, SlidingMenu.SLIDING_WINDOW | SlidingMenu.SLIDING_CONTENT)
. Besides that, i want to replace listView to my customed ListFragment, that is:
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.menu_frame, new SampleListFragment())
.commit();
But since my activity is not a subclass of FragmentActivity, so getSupportFragmentManager()
would failed. And getFragmentManager()
doesn't work too. Here are the details: Fragment add or replace not working. So, in short, i want attach a sliding menu to my activity, and i want the replace call success too, how can i achieve that?