I have an ActivityGroup inside a tab of the TabHost, and that ActivityGroup has multiple child activites.
When device is rotated the tab doesn't preserve it's state (I'm aware that on orientation changes activities are restared).
What is the best practice to keep the state of the ActivityGroup's child activity that was shown before the screen rotation?
Note that I may need to keep the states of every child activity of the ActivityGroup.
I used the following in the AndroidManifest to save the views from beeing destroyed but it did not work:
android:configChanges="orientation"
I just solved my problem by changing in the AndroidManifest.xml this line :
<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="15" />
to
<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="11" />
Seems like my environment had trouble with a different target version as it recognized and added it automaticaly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With