views:

63

answers:

1

In a previous question I asked how I could display two different layouts for portrait and landscape orientations:

Problem switching to landscape orientation

Now I would like to know how I can save the state of my application before it goes into another orientation? I seem to lose this data any time orientation changes.

+2  A: 

This kind of quesiton has been answered before.

But there are also other ways not listed in the previous answer. For example using the onRestoreInstanceState() method, as explained here. This method is the advised way of storing state between configuration changes, and was poorly documented until recently.

bramp