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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:05:51+00:00 2026-06-10T15:05:51+00:00

I cant seem to set my spinners position back to what it was before

  • 0

I cant seem to set my spinners position back to what it was before I called a second activity.

Layout of App:
Activity “Main” has a spinner and 8 buttons, the user selects a item from the spinner and then clicks on an button to open that activity (I do NOT call “finish()” on the “Main” Activity). After the user is finished with the second activity I exicute the following code to bring the “Main” activity back to front.

private void exitActivity() {
    Intent mainIntent = new Intent(this, Main.class);
    startActivity(mainIntent);
    finish();
}

My problem is that my spinner in the “Main” activity is always set back to position 0 and not to what was selected prior to the user going to the second activity.

Thanks for you help.

Looking like an idiot in 3, 2, 1…

  • 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-10T15:05:52+00:00Added an answer on June 10, 2026 at 3:05 pm

    Why are you doing?:

        Intent mainIntent = new Intent(this, Main.class);
        startActivity(mainIntent);
    

    Calling finish() is enough to get you back to the Activity in which the second activity was started.

    Since that activity didn’t close, the spinner will be like it was before you started the second activity.

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

Sidebar

Related Questions

Im sure its something simple, but i cant seem to set variable data from
I'm trying to set up the swiz framework in flex but cant seem to
Hey I have a session object I just cant seem to destroy or set
I have the following composable dml and I cant seem to set it working.
I cant seem to find a way to set a secure cookie in expressjs
I know this has been addressed many times, but i just cant seem to
I cant seem to figure out whats wrong with this set of code. I
I am writing a mobile app using jquery mobile. I cant seem to figure
It feels like this question has been asked before, but no questions seem to
I can't seem to understand how to set the height correctly for the jquery

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.