How to fix rotation on webview for Android phones?

后端 未结 4 1239
野性不改
野性不改 2021-01-15 04:48

I\'m trying to figure out how to fix the orientation problem on webview. Basically every time the user changes the orientation on the device the program goes white and reloa

4条回答
  •  無奈伤痛
    2021-01-15 05:37

    Beginning with Android 3.2 (API level 13), the "screen size" also changes when the device switches between portrait and landscape orientation. Thus, if you want to prevent runtime restarts due to orientation change when developing for API level 13 or higher (as declared by the minSdkVersion and targetSdkVersion attributes), you must include the "screenSize" value in addition to the "orientation" value. That is, you must decalare

    
    

    Here's the docs: http://developer.android.com/guide/topics/resources/runtime-changes.html

提交回复
热议问题