mydeve
mydeve

Reputation: 563

android webview preserve state on orientation change

i have called webview in android now i want to preserve state when orientation changes , i had called android:configChanges for activity still not working see below

    <activity 
        android:name=".MainActivity"
        android:configChanges="orientation|keyboardHidden|keyboard"/>

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

what have i to do to make it work

Upvotes: 0

Views: 153

Answers (1)

MrDumb
MrDumb

Reputation: 2178

Try This, It works very fine for me. Add "screenSize" in configChanges

android:configChanges="orientation|keyboardHidden|screenSize"

Upvotes: 3

Related Questions