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 8915545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:59:42+00:00 2026-06-15T04:59:42+00:00

i’m kinda new to Android but, i’m creating an app that will use Tabs

  • 0

i’m kinda new to Android but, i’m creating an app that will use Tabs for navigation and i’m using ActionBarSherlock as a library to use FragmentsTabs. I create my tabs succesfully 🙂 ! Here’s how i did it:

public class Main extends SherlockFragmentActivity {


protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    ActionBar bar = getSupportActionBar();
    bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    ActionBar.Tab tab1 = bar.newTab();
    ActionBar.Tab tab2 = bar.newTab();
    tab1.setText("HOW IT WORKS");
    tab2.setText("CURRENT POSITION");
    tab1.setTabListener(new MyTabListener());
    tab2.setTabListener(new MyTabListener());
    bar.addTab(tab1);
    bar.addTab(tab2);

}

And then i have my TabListener who handles the content replacements between tabs, that’s working fine. But my QUESTION IS how can i add an OptionsMenu now that i have the tabs?? i understand that i’m adding the Tabs to the Action Bar, but i need to add an OptionMenu to the Settings of my app. So it would be something like this next example:

Image of a Tab Navigation with OptionMenu at the top

As you can see, there’s the tabs navigation but at the top you’ll see the logo and the OptionsMenu, and i don’t know how to do that with the Tabs already implemented, i tried to do it as the usual implementation of a OptionsMenu and add the public boolean onCreateOptionsMenu(Menu menu) inside my Activity and there inflate my menu, but i’m recieving this errors:

- Cannot override the final method from SherlockFragmentActivity
- overrides 
 com.actionbarsherlock.app.SherlockFragmentActivity.onCreateOptionsMenu

Here’s an ScreenShot of how it looks the app so you can understand me.

MyApp with tabs but i need to place the optionsMenu

  • 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-15T04:59:43+00:00Added an answer on June 15, 2026 at 4:59 am

    The override error is probably because your import is for the standard Android Menu, and not the ABS one.

    Check your imports to make sure your onCreateOptionsMenu(Menu menu) is based on com.actionbarsherlock.view.Menu (and NOT android.view.MenuItem).

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need a function that will clean a strings' special characters. I do NOT
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but

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.