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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:27:11+00:00 2026-05-28T13:27:11+00:00

The app has an Action Bar, the action bar has several navigation tabs on

  • 0

The app has an Action Bar, the action bar has several navigation tabs on it. If someone runs the app this happens:

  1. Open app, view content in fragment 1 (tab 1)
  2. Tap tab 2, see content in fragment 2.
  3. Tap tab 3, see content in fragment 3
  4. Hit Back. The fragment vanishes, and the tab content is left empty. Hit back again, another blank fragment shows, hit back again and another blank fragment, hit back again, you exit the app.

What I want to happen is for someone to visit a series of tabs, then use Back to cycle back through them. I’ve spent hours trying to figure it out and I’m stumped. Help a guy out of his misery?

  • 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-05-28T13:27:12+00:00Added an answer on May 28, 2026 at 1:27 pm

    Ms. Hackborn, in another answer somewhere here in SO, really did not like what you’re aiming for IIRC. Tabs are an independent navigation metaphor. Just as pressing the BACK button in a Web browser does not magically close up tabs, nor should pressing the BACK button in an Android app. Pressing the BACK button might change the content in the current tab, before eventually exiting the app.

    That being said, if your quite certain that this is the navigation you want, don’t use the built-in back stack but manage it yourself, no different than if you wanted tabs in an old-style TabHost to vanish based on a BACK button press. You would keep tabs (pun lightly intended) of the tabs you add, then use removeTab() or removeTabAt() on ActionBar to get rid of them. On your last tab, your onBackPressed() would chain to the superclass for normal finish-the-activity logic.

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

Sidebar

Related Questions

My Android app has a button that executes this code in order to open
My iPhone app has a tab bar controller, and one of the tabs is
I have an ActionBar in an app, and it has navigation tabs embedded in
I developed an application in ASP.NET MVC. This app has an action that returns
My app has several buttons which trigger different events. The user should NOT be
This is my code: package com.example.testcode; import android.app.ListFragment; import android.app.LoaderManager; import android.content.CursorLoader; import android.content.Loader;
I have a navigation app that has many screens the user navigates to. A
My Facebook app has had an action pending for some time now. Does anyone
My app has a GtkFileChooserButton that you can use to open a chooser widget
I'm working on a status bar app that has a left and right click.

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.