I’m trying to build an android app using phonegap with several Cordova webviews. Now in order to do that, I’ve tried to create a FragmentActivity that implements CordovaInterface. However, the Cordova webviews in the fragments are losing their state whenever I switch between the fragments or as soon as there is a configuration change on android.
To switch between fragments, I’m using:
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(container, frag)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.addToBackStack(null)
.commit();
where container
is the fragment container and frag
is my Cordova webview fragment
Any idea why the replace
function is not saving the state of the current Cordova webview?
No comments:
Post a Comment