mgks / Android-SmartWebView

A simple use webview integrated w/ native features to help create most advanced hybrid applications.
https://mgks.dev/smart-webview
MIT License
571 stars 278 forks source link

How to prevent default reload on rotation of the screen #211

Open oleg-schmidt opened 3 years ago

oleg-schmidt commented 3 years ago

When a user navigates inside the app and the WebView and rotates the screen from portrait to landscape and vice verse, the app reloads back to the root url.

How to prevent this refresh?

Many Thanks in advance!

gabrielbartelega commented 3 years ago

I have the same problem

mgks commented 3 years ago

This one is an old bug, possible solved. Are you guys sure you're using the latest variant?

EddieLongStockings commented 2 years ago

Hello, I'm having this problem and I'm using the latest variant.

Thank you,

RedmarStienstra commented 1 year ago

I fixed this bug as follows:

Add this line: android:configChanges="orientation|screenSize"

to the <activity in your AndroidManifest.xml

I hope this is also the solution for others.