Maintain WebView content scroll position on orientation change

前端 未结 8 759
隐瞒了意图╮
隐瞒了意图╮ 2020-12-23 02:04

The browsers in Android 2.3+ do a good job at maintaining the scrolled position of content on an orientation changed.

I\'m trying to achieve the same thing for a We

8条回答
  •  死守一世寂寞
    2020-12-23 02:13

    onPageFinished may not be called because you are not reloading the page, you are just changing the orientation, not sure if this causes a reload or not.

    Try using scrollTo in the onConfigurationChanged method of your activity.

提交回复
热议问题