Orientation problem android + phonegap

I am creating an Android application in the gap in the phone. But when I change the orientation from portrait to landscape, I get the application from the very beginning, and not from where I was in the portrait. how can i solve this problem?

+5
source share
2 answers

Did you use the tutorial? If so, I apologize for the mistake. Android WebView by default reloads the configuration when the orientation changes, and we specify it in the manifest file:

<activity android:name=".YourAppName"
              android:label="@string/app_name" android:configChanges="orientation|keyboardHidden">

, PhoneGap . , , Android . , , , reset , WebView .

+9

android, , , OnCreate(). , Activity

Activity .

public void onConfigurationChanged ( newConfig) {       super.onConfigurationChanged(newConfig);       }

+1

All Articles