Return to Snippet

Revision: 35412
at November 7, 2010 23:26 by phantomas


Initial Code
If you do not want views to reload on orientation changes simply override onConfigurationChanged in your Activity class:

@Override
public void onConfigurationChanged(Configuration newConfig){        
    super.onConfigurationChanged(newConfig);
}

And set the android:configChanges attribute in the manifest:

<activity android:name="..."
          android:label="@string/appName"
          android:configChanges="orientation"

Initial URL
http://stackoverflow.com/questions/1002085/android-webview-handling-orientation-changes/2246555#2246555

Initial Description

                                

Initial Title
Prevent views from being invalidated when device rotates (=orientation changes)

Initial Tags

                                

Initial Language
XML