I am using start activity for result to help users of my application filter some information out. Once the information is filtered i add it to the intent and then call finish. The works perfectly except for when the users have rotated the device when they are performing the filtering. This causes the first activity to create all over again and since this happens my filtering options are wiped out (They finish before onCreate is over so the UI is cleared). Any ideas on a way to handle this?
Thanks
I am using start activity for result to help users of my application filter
Share
There are 3 options to do this
onSaveInstanceState()// But can usually handle small amount of dataonRetainNonConfigurationInstance() and getLastNonConfigurationInstance()//Preferredandroid:configChanges="orientation|keyboardHidden"in AndroidManifest.xml// This will not let the activity to get restarted, use this when the data you want to conserve is not large.For api 13+ use this
android:configChanges="orientation|screenSize"