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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:30:50+00:00 2026-06-01T09:30:50+00:00

Calling getActionBar returns null . This has been frequently reported so I’ve made sure

  • 0

Calling getActionBar returns null. This has been frequently reported so I’ve made sure to include the solutions others have used: My minSdkVersion=11, I do have a titlebar, and I’m calling getActionBar after setContentView. Also, my activity is not a child activity.

setContentView(R.layout.main);

// experiment with the ActionBar 
ActionBar actionBar = getActionBar();
actionBar.hide();

Device is a Samsung Galaxy Tab 10.1 running Android 3.2

Thanks in advance for any ideas or suggestions!

  • 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-01T09:30:52+00:00Added an answer on June 1, 2026 at 9:30 am

    It seems you need to request having an Actionbar (!= titlebar) either via a Theme or via below code.

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    
        // The Action Bar is a window feature. The feature must be requested
        // before setting a content view. Normally this is set automatically
        // by your Activity's theme in your manifest. The provided system
        // theme Theme.WithActionBar enables this for you. Use it as you would
        // use Theme.NoTitleBar. You can add an Action Bar to your own themes
        // by adding the element <item name="android:windowActionBar">true</item>
        // to your style definition.
        getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
    
        setContentView(R.layout.main);
    
        // experiment with the ActionBar 
        ActionBar actionBar = getActionBar();
        actionBar.hide();
    }
    

    Code from [here]

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

Sidebar

Related Questions

Calling OnPropertyChanged for an ObservableCollection only works when there has been some change to
Calling concat on vectors returns a list. Being a total noob I would expect
Calling Index view is giving me this very very annoying error . Can anybody
Calling setFocus(null) on the ItemizedOverlay does not 'unfocus' current marker. According to the documentation:
While calling XslCompiledTransform.Transform() method I get this exception : The Writer is closed or
Calling index.php?pConta=1&pDataInicial=01-01-2000&pDataFinal=31-12-2000 I get this notices: [08-Oct-2009 17:30:35] PHP Notice: Undefined index: pConta in
Calling all cross-compatibility experts! Please check out this page on my site, as it
Calling IEnumSTATURL::Next within my application returns E_UNEXPECTED(0x8000FFFF) instead of S_OK . Sadly, that particular
Calling this method: public static @Nonnull <TV, TG extends TV> Maybe<TV> something(final @Nonnull TG
Calling system() to run an external .exe and checking error code upon errors: #include

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.