Question

I am building a GoogleTV app that contains a WebView. If I change the device's language while the app is loaded, then the webView refreshes. This is a very jarring experience and totally unnecessary since my app only displays English.

How can I stop the webview from reloading?

Était-ce utile?

La solution

I'm not certain, but guessing this is because your app is getting a configuration change restart due to a changing locale.

Try suppressing this configuration change by adding android:configChanges="locale" to the <activity> and see if it helps.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top