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

  • Home
  • SEARCH
  • 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 9005487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:09:28+00:00 2026-06-16T01:09:28+00:00

I use this in an app that I target Android 3.0+ only. I’d like

  • 0

I use this in an app that I target Android 3.0+ only. I’d like to get more people but the ActionBar is not backwards compatible. I do not want to use a third party library like ActionBarSherlock. I went down that road and it was more of a pain then it was worth.

I have code like this:

final ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
actionBar.setDisplayHomeAsUpEnabled(true);

It is possible to wrap this with an if – else SDK check? Outside of the Action Bar, 99% other code is compatible pre-3.0 (well, I am using Fragments but using the Support Library.)

  • 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-16T01:09:29+00:00Added an answer on June 16, 2026 at 1:09 am

    Yes, something like this:

          @TargetApi(Build.VERSION_CODES.HONEYCOMB)
            private void setupActionBar() {
                  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
                     actionBar = getActionBar();
                     actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
                     actionBar.setDisplayHomeAsUpEnabled(true); 
                    }           
            }
    

    Make sure to have your actionBar variable global

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

Sidebar

Related Questions

I have a Django app that use a django-tagging. I need to port this
Quick question. I have an app that use a native DLL through PInvoke, this
i use this code in my app. just found is not correct when compare
I am trying to use this code in my QT app QMap<QString,QMap> but there
I use a script which opens the story editor like this: app.menuActions.itemByID(119793).invoke(); How can
Maybe it's wrong but I always use this query for my app: cme_only =
I am trying to make this landscape only iphone app. I only use this
I use android.support.v4.app.FragmentActivity for create a app with multi fragment/panels that can be access
Related to this question: Use with XMLVM to convert android app to iphone app
I cannot find find FragmentPagerAdapter within Android.App. I do not want to use the

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.