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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:04:53+00:00 2026-05-16T22:04:53+00:00

I am only a beginner to Android, but I have noticed a number of

  • 0

I am only a beginner to Android, but I have noticed a number of things that seem a little strange in the third notepad tutorial:

  • The tutorial explicitly states that you need to call saveState from BOTH onSaveInstanceState and onPause. Is this really necessary? It seems to me from reading the process life-cycle documentation that onPause will always be called before the Activity is killed, regardless of whether it is done so by the system or the user. If this is the case, surely just calling saveState from onPause is sufficient?
  • Calling populateFields() in both onResume and onCreate is pointless, since onResume is always called after onCreate anyway. Hence if I understand correctly, the call in onCreate serves no useful purpose and can be safely removed.

Could someone please either confirm these points, or let me know what I have misunderstood.

Olly

  • 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-16T22:04:54+00:00Added an answer on May 16, 2026 at 10:04 pm

    From what I understand…

    You are correct that onResume is always called eventually after onCreate, and you can often put the code there. Keep in mind though that onResume will also be called when an activity comes back to the foreground, without first going through onCreate. So for one time initialization code (like setContentView() or initializing variables) the onCreate event is a better place.

    Also, you are correct about the onPause and onStop. onPause is where you’d normally code the state handling. onPause is killable so that onStop can potentially not even get called in very low memory situations.

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

Sidebar

Related Questions

i am a beginner in making website, i learned things at msdn only, but
I only want a list of files that have been added (not ones that
I have a project that adds elements to an AutoCad drawing. I noticed that
This sounds like a issue a beginner like me would only have...this is my
Sorry if it's a silly question...i m only a beginner in android programming. i
Hi everyone I am a beginner in android, please help. I have DBAdapter class
Good morning folks, I'm just that beginner in json, I have a formated data
I am a beginner SQL user (not formally trained; OJT only) and need some
Details: Only disable after user clicks the submit button, but before the posting back
The only experience I have so far with a touchscreen interface was one where

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.