tags:

views:

37

answers:

1

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.

A: 

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.

Manfred Moser
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