user1364280
user1364280

Reputation: 31

Inflate + Vertical Screen

I'm generating my layout using LayoutInflater. Basically I have a button that when is pressed the activity stops and another one starts, in the new activity the user fill some fields and the result is sent back to the last activity, so I generate a TableRow with these informations. The problem is, when I press ctrl + f11(vertical screen), the activity is destroyed and recreated, so what can I do to retrieve the informations about the inflated views?

Upvotes: 0

Views: 79

Answers (2)

Murat Nafiz
Murat Nafiz

Reputation: 1438

If you add android:configChanges="keyboardHidden|orientation" parameter to your activity in your manifest file, your activity will not be destroyed/recreated when orientation changes

Upvotes: 1

Sparky
Sparky

Reputation: 8477

Persist and restore your active form data in onSaveInstanceState() and onRestoreInstanceState().

See http://developer.android.com/guide/topics/fundamentals/activities.html#ConfigurationChanges

Upvotes: 0

Related Questions