Is there a way in b4a to persist a webview when the orientation is changed?
We can obviously get the url and reload it, but what if the user has entered some data and then decides to rotate. All is lost.
Searching on net shows the use of manifest edit
android:configChanges="orientation|screenSize"
but it requires
something that doesn't seem to be inplemented in b4a
Another option documented in java is to
protected void onSaveInstanceState(Bundle outState) {
webView.saveState(outState);
}
and
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.blah);
if (savedInstanceState != null)
((WebView)findViewById(R.id.webview)).restoreState(savedInstanceState);
}
If this method is possible with JavaObject or Reflector, I have no idea how to do it.
Ideas?