How android:configChanges=“orientation” flag affects ACTIVITY STACK when it includes translucent activities?
Have following Activities
NOTE: android:configChanges="orientation" is mentioned in Manifest for TranslucentChildActivity so that doesn't get re-created
- MainParentActivity startActivityForResult --> TranslucentChildActivity
- TranslucentChildActivity startActivityForResult --> DialogGrandChildActivity
- Now change orientation
- DialogGrandChildActivity should be destroyed and re-created
- TranslucentChildActivity should also be affected as it is in the background of the dialog activity but since onConfigChange flag is set it shouldn't be destroyed
- BUT UNFORTUNATELY TranslucentChildActivity is also destroyed and re-created and onConfigurationChanged() callback isnt called which is surprising...
- android:configChanges="orientation" flag isn't applicable to translucent activities?
- How do I stop this translucent activity from being re-cycled?
I tried quite a few ways without any success. I would appreciate any help.
- Even though the translucent child activity has the flag set to handle its orientation change it will be ineffective if the MainParentActivity behind the translucent doesn't have the flag android:configChanges="orientation" set
- Since the main parent is killed the whole activity stack will be destroyed and re-created
- No matter if any child has any flag set
- It will all be overridden