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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:26:44+00:00 2026-06-11T20:26:44+00:00

I have sort of wizard in app going through 6 Activities. so I call:

  • 0

I have sort of wizard in app going through 6 Activities.

so I call:

Main Activity
– Call Option 1
– Call Option 2
– Call Option 3
– Call Option 4
– Call Option 5

Now, on Option 5 I perform save of the whole action to database, and at that point I need to go back to Main Activity and destroy Option1,2,3,4 and 5.

Until Option 5 saves to database, I need to be able to go back, do changes, go forth to Option 5 and save it.

IS proper way to do it that I somehow create method that would have:

private void cleanStack(){
   Option1.finish();
   Option2.finish();
   Option3.finish();
   Option4.finish();
   Option5.finish();
}

And then start (or resume) Main Activity?

Tnx

  • 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-11T20:26:45+00:00Added an answer on June 11, 2026 at 8:26 pm

    What I would do is, rather than finishing all the Activities, create an Intent to call back to your MainActivity.

    Use the setFlags method to give this Intent the FLAG_ACTIVITY_CLEAR_TOP.

    This will check your stack to see if an instance of MainActivity already exists, and if it does it’ll bring that Activity to the front and clear all the Activities above it instead of restarting MainActivity and putting it on top of the stack.

    You may need to refresh the data, if MainActivity requires info from Options 1-5, as CLEAR_TOP will, in most cases, bring the old instance of MainActivity into focus rather than completely recreating it (onCreate will not be called, but onStart and onResume will).

    Here’s the documentation on the Intent class. There are other flags that can help you with navigation if you get stuck. Good luck!

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

Sidebar

Related Questions

My silverlight app takes the user through a sort of wizard-like process, so for
I have sort of a tricky problem I'm attempting to solve. First of all,
So in nokia we can have sort of Microsoft Silverlight installed to system. We
I have some sort of problem, when it comes to customizing the iPad-launch-lcreens of
I have a sort of plug-in model in which various complex user controls are
I have some sort of recursive function, but I need to parse a string,
I have this sort of format asp.net MVC View -> Service Layer -> Repository.
I have a sort of unique situation....I want to populate a ModelChoiceField based of
I have to sort out my data by some column, such that some specific
I have some sort of a design problem with my Django AJAX application. I

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.