0

I have a single activity with multiple views that represent different steps in a wizard. I have gotten code working that will save and restore the wizard to the correct screen, but after a save/restore cycle I cannot seem to get setContentView to work. The code executes without throwing any exceptions but the view isn't actually updated. Why would this be happening?

edit: SOLVED I was using a handler to change screens, but on restore I wasn't using the newly constructed one, so messages were being sent to a handler that didn't have control of the screen.

1 Answer 1

0

You might be filling the contentview with data in onCreate rather than onResume. onCreate is not called again if you are doing a save/restore cycle. It might be worth checking which lifecycle method is called. It would also be helpful to know how you save/restore.

1
  • It seems onCreate IS being called because it's bringing me to the right place. I'm putting an int in a bundle using onSaveInstanceState and then retrieving it from the bundle onCreate
    – tahnok
    Jul 27, 2010 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.