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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:10:03+00:00 2026-05-22T18:10:03+00:00

I have an application with a TabActivity containing ActivityGroup. Each tabs works fine, but

  • 0

I have an application with a TabActivity containing ActivityGroup. Each tabs works fine, but for one specific tab I want to go back to the first child activity when there’s a click on it (whenever we are in a child activity of this tab or inside another tab).

I tried to start the activity that I want on the onResume of my ActivityGroup, it works when I’m on another tab, but not when I’m on this tab, with a child activity.

Do I have to use another intent flag than FLAG_ACTIVITY_CLEAR_TOP for this tab ?
Does anyone have a clue ?

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-05-22T18:10:04+00:00Added an answer on May 22, 2026 at 6:10 pm

    Usualy with ActivityGroup you have some kind of history.

    Let’s say your history is:

    ArrayList<View> history;
    

    Of course history needs to be initialized and have some Views in it which can be retrieved with:

    getLocalActivityManager().startActivity(clazz.getName(), new Intent(this, clazz)).getDecorView();
    

    where clazz is the class of your child Activity.
    So on click in current ActivityGroup define a method like:

    public void backToFirst() {
        int size = history.size();
        while (size > 1) {
            history.remove(size - 1);
            size = history.size();
        }
        setContentView(history.get(0));
    }
    

    Hope I understood you correctly and this is the answer you are looking for.

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

Sidebar

Related Questions

I have a TabActivity with several tabs. Each tab corresponds to a specific view,
Here's my problem: I've have an application with tabs. in each tab I have
My application has a TabActivity which contains 4 tabs. Each tab contains the corresponding
I have an application with 4 tabs (TabActivity). By some reasons I call GC.Collect
I want to create an Application with tabs, and I have found this guide
I have an android tabbed application and inside one of my tabs is an
I have an application that is a Tab activity with various tabs that load
I have Tab Based Application where i want to Reload the Tab activity when
I am using TabActivity for my application. It has 4 tabs. Tab 1 is
I have an application with tabs and every tab has HttpCLient that is triggered

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.