stop webview from unloading the page when the screen is rotated

NeoTechni

Well-Known Member
Licensed User
Longtime User
Since its an activity object I've been declaring it in activity-create
which makes it unload the page on rotations. Is there a way to avoid this?
 

agraham

Expert
Licensed User
Longtime User
Is there a way to avoid this?
No, this is by (Android) design. Because the entire Activity is recreated on rotate all the screen elements must be recreated too. Trying to carry visual elements across rotations can cause large memory leaks. In Java you need to be careful about this, using Basic4android ensures that you can't.
 
Upvote 0
Top