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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:35:08+00:00 2026-06-17T11:35:08+00:00

I have been learning Action Bar, I want the top menu to have Tabs

  • 0

I have been learning Action Bar, I want the top menu to have Tabs + One Refresh button. So, I have tried to make a simple menu with one button:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    menu.add("Refresh")
    .setIcon(R.drawable.abs__ic_search_api_holo_light)
    .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);

    return true;
}

And adding tabs:

mViewPager = new ViewPager(this);
mViewPager.setId(R.id.pager);

setContentView(mViewPager);
ActionBar bar = getSupportActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
bar.setDisplayShowTitleEnabled(false);
bar.setDisplayShowHomeEnabled(false);

mTabsAdapter = new TabsAdapter(this, mViewPager);
mTabsAdapter.addTab(bar.newTab().setText("Grades"), FragmentOne.class, null); // many more tabs in same format

However the problem is when the app is in portrait mode, the menu bar goes to a level below. When in Landscape mode it is more acceptable, however it groups them into pull down list. I have read Android’s ActionBar but could not find a solution. What is the workaround this? I only want the Tabs to be scrollable to left-right, and refresh button static at right. Do I need to make a layout and inflate it somehow?

Portrait Mode
Landscape Mode

  • 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-17T11:35:08+00:00Added an answer on June 17, 2026 at 11:35 am

    This is a known bug, see this conversation: https://groups.google.com/forum/#!topic/actionbarsherlock/wYuKJUdO1vs/discussion

    There is also feedback and a little workaround by Jake Wharton himself, but I don’t think it will help you a lot (since you want the tabs, not the spinner).

    This solution may be more helpful for you: https://stackoverflow.com/a/13828869/1140682

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

Sidebar

Related Questions

I have been using the Learning Java 2nd Edtion book to try make my
I have been learning HTML5. One of the examples I have encountered uses an
I have been learning NodeJS recently. It seems to be standard in the Node
I have been learning about Delegation and Data Sources for iOS programming and need
I have been learning css & jquery. <!DOCTYPE html> <html> <head> <style type=text/css> #box
I have been learning Hibernate for the past few weeks, I have gotten most
I have been learning Scala for the past couple of months and now I
I have been learning the mapreduce algorithm and how it can potentially scale to
I have been learning a bit of Python 2 and Python 3 and it
I have been learning python for some time now. While starting this learning python

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.