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

The Archive Base Latest Questions

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

I have an actionbar with a button on the left, a logo in the

  • 0

I have an actionbar with a button on the left, a logo in the center and another button on the right. However, whenever I launch a new intent or activity, the whole actionbar “refresh”.

I understand that I need to use Fragments. However, how do I go about implementing that? I saw a lot of examples are fragments with tabs. But I just want my actionbar to remain fixed as I move from one activity to another. I do not have any tabs at all.

Can you please give me examples on how do I go about implementing it? If I have activity A and B. Does that mean I should have 2 fragments?

Many thanks!

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

    If you want to have only 1 action-bar for all activities you will create a FragmentActivity class in which you will display Fragments. Only this FragmentActivity will have a action bar.

    You can add, remove, replace Fragments in its(FragmentActivity’s) body and change it when you want, like this

      FragmentManager fmu = getSupportFragmentManager();
      FragmentTransaction transaction = fmu.beginTransaction();
      transaction.replace(R.id.realViewSwitcher_body, English.newInstance()).commit();
    

    Here realViewSwitcher_body is initial View present in FragmentActivity a I replaced it with a Fragment (English.newInstance() its a method with is returning a fragment instance)

    This is the whole Scenario either you use Tabs or View-Pager etc and up to my knowledge and experience you can not use Intents for activities having only one Action-bar.

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

Sidebar

Related Questions

I have noticed that when using actionBar.setSelectedNavigationItem(x) in the onCreate() method of my Activity,
I have app which has actionbar containing 1) up button which opens side bar
I have a button in my actionbar, when I click that I want to
In my main activity, I have an ActionBar with navigation tabs and action items.
simple maybe stupid question. I have a login activity which launches another activity, and
We have a file manager-like application where we use the action bar home button
I have a actionbar with a custom layout, but this show me the icon
I have an actionBar with multiple items, I would like to change the colour
I have this application where I implement the ActionBar Fragment interface. Underlying the interface,
I have an app that uses the ActionBar with tabs in combination with Fragments.

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.