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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:09:34+00:00 2026-06-11T07:09:34+00:00

I am using ActionBarSherlock on Android 4.0.3, so it might use the native ActionBar.

  • 0

I am using ActionBarSherlock on Android 4.0.3, so it might use the native ActionBar.

When I launch my application everything works fine. However, when I go to the Homescreen and wait until its killed (or simply change the system font, then it happens imediately) and then switch by the “last used”-dialog again to the app everything reloads smoothly, except the Actionbar has now empty tabs.

So the tabs are there, but empty (and do not work).
The strange thing is that even in the Application object onCreate is called (as in the TabParentActivity, see code below), so theoretically the Application should have been completely restarted (and not just partially like onResume…).

When I then kill my app (via the task manager) and reopen it the problem has gone.

How I add the Actionbar in my TabParentActivity:

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tab_parent);

        //Global initialization
        ...

        ActionBar ab = getSupportActionBar();
        // set defaults for logo & home up
        ab.setDisplayShowHomeEnabled(true);
        ab.setDisplayShowTitleEnabled(false);
        ab.setDisplayHomeAsUpEnabled(false);
        ab.setDisplayUseLogoEnabled(true);
        ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); 

...

for(StolScreen s: screensInTabs){
            Tab t = mAb.newTab().setText(s.displayName);
            t.setTabListener(new NormalTabListener(this.mActivity, s));
            mAb.addTab(t);
        }
}

How it looks like:
All ok
Now tabs empty

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

    I was now able to solve it by myself.
    The reason is really crazy: In the above code I set the label of a tab in the loop with the s.displayName. s is belonging to an Enum called StolScreen.

    In there the displayName is initialized via a call in Tools (initialized before), which retrieves the display name from an xml file. What was now actually happening when I was returning to the activity (and only then), was that StolScreen was loaded (in an Enum the fields are loaded like static members) BEFORE Tools was initialized.

    So just an empty String was put on the tabs :D. Anyway, thx 4 help 😉

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

Sidebar

Related Questions

I'm using ActionBarSherlock for ActionBar compatibility. Everything works great except for the navigation dropdown
I set up a test app using ActionbarSherlock 4.0, which works fine in the
I'm using ActionBarSherlock to implement an ActionBar with tabs in my application. When I
I'm using ActionBarSherlock. On Android 3.0+, there's a subtle shadow under the ActionBar. But
I'm using ActionBarSherlock in my Android project, and it's awesome. One small issue: My
I'm developping an application using ActionBarSherlock component. My goal is to target all devices
I am trying to use Jake Wharton's ActionBarSherlock to support actionbars in android projects
I'm using ActionBarSherlock in an Android project that I developed using Eclipse. I'd like
I am using ActionBarSherlock to implement action bar for Android 2.1 platform. But in
I am using ActionBarSherlock to implement action bar on my Android 2.1 API 7

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.