Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8903671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:55:35+00:00 2026-06-15T01:55:35+00:00

I have a class which creates a behindMenu for a Sliding Menu as follows:

  • 0

I have a class which creates a behindMenu for a Sliding Menu as follows:

public class BehindMenuFragment extends ListFragment {

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    String[] categories = getResources().getStringArray(R.array.categories);
    CategoryAdapter adapter = new CategoryAdapter(getActivity());
    int cats = categories.length;
    for (int i = 0; i < cats; i++) {
        adapter.add(new CategoryItem(categories[i], getIcon(categories[i])));
        }
    setListAdapter(adapter);
}

It gets called from another activity MainActivity with the following code:

getSupportFragmentManager()
    .beginTransaction()
    .replace(R.id.menu_frame, new BehindMenuFragment ())
    .commit();

The above code works fine no problems, I want to insert an Action Bar using ActionBarSherlock to the behind menu I’ve tried it in every way possible to no avail.

Extending BehindMenuFragment as a SherlockListFragment gives me the following error:

IllegalStateException: BehindMenuFragment must be attached to a SherlockFragmentActivity

Im at a loss and don’t know how to move forward with this problem please help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:55:36+00:00Added an answer on June 15, 2026 at 1:55 am

    It appears you haven’t done step four:

    Setup with ActionBarSherlock

    1. Setup as above.
    2. Checkout a clean copy of ActionBarSherlock and import into your Eclipse workspace.
    3. Add ActionBarSherlock as a dependency to SlidingMenu
    4. Go into the SlidingActivities that you plan on using make them extend Sherlock___Activity instead of ___Activity.

    Having never worked with this library I would guess that you should change MainActivity to:

    public class MainActivity extends SherlockSlidingFragmentActivity {
    

    Now you can use a SherlockListFragment:

    public class BehindMenuFragment extends SherlockListFragment {
    

    And add Sherlock’s ActionBar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this class which creates a grid: class GridPane extends JPanel{ public GridPane(int
I have created a class which extends View class. public class SplashScreen extends View
I have a class (simulation) which creates an instance of another class (GUI). Inside
i already have a project with TreeNode class which creates a hierachy of nodes
I have a fairly straightforward Java class here which creates 2 thread pools.... Connects
Ok. I have a class Game, which creates an instance of my class Board,
I am trying to create downloading progress. I have my class which extends AsyncTask:
I have created a class which extends Gallery. There is no onCreate() method in
I have a library which creates objects (instances of class A) and pass them
I have a ListView-derived class which creates a bunch of user controls that are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.