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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:40:00+00:00 2026-06-09T10:40:00+00:00

I found several questions regarding this and it appears that I have to correctly

  • 0

I found several questions regarding this and it appears that I have to correctly use onSavedInstanceState and onRestoreInstanceState methods.

My application creates an array of cards and shows them in a gridview, each grid containing a textview.

While in the app, after adding cards; if I go out of the application using the menu button, everything resumes fine after comming back. However, on orientation change all the ‘table’ is reset; all the cards have to be added again.

So, why do I loose information on screen orientation change and not on exiting and reentering the app. How can I fix that?

The mentioned methods only have this:

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);  
}

@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(savedInstanceState);

}

My onCreate method begins with:

super.onCreate(savedInstanceState);
  • 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-09T10:40:02+00:00Added an answer on June 9, 2026 at 10:40 am

    A change in orientation of the device recreates the entire activity – calling onCreate() all over again. Whereas when you use the home button the activity is paused (onPause()) and then when it is made visible again it enters through the onResume() method. Hence anything done in onCreate() is retained.

    http://developer.android.com/reference/android/app/Activity.html

    I think this is probably what you are looking for

    http://developer.android.com/guide/topics/resources/runtime-changes.html

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

Sidebar

Related Questions

I've found several other questions that deal with this topic, but I just can't
After reading several questions about .gitignore I have found no one that could answer
I have several questions regarding CI application design. Q. When creating a new form
I have found several questions on Stack that have show lots and lot of
I have found several questions asking about template typedefs in C++0x, which are resolved
I have found several other questions here on S.O. (and the web in general)
This is a very famous questions in Google. I found several suggestion to achieve
I've read several questions regarding UAC and privilege elevation but I've not found a
I've found several questions that are sort of similar to mine, but not 100%.
I found several other questions on SO regarding the JavaMail API and sending mail

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.