Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebView slow scrolling

For some reason the WebView I am using is quite slow, I don't have to much of a problem with the loading times for web pages, although if there is a way to improve that I would appreciate it. But my main concern is the jagged laggy scrolling. I'm reasonably sure there must be a way to get it working more smoothly, as other apps using (I assume) the WebView don't have this problem. I suppose it may be possible that these other apps are using some private web client although it seems to me very unlikely that all of them would. Others have asked similar questions on SO, but none of the answers are particularly effective.

like image 945
timeshift117 Avatar asked Dec 12 '25 03:12

timeshift117


2 Answers

i think you have this code in your manifests

android:hardwareAccelerated="false"
android:largeHeap="true"

you have to delete if you have it.

like image 169
ozanurkan Avatar answered Dec 13 '25 17:12

ozanurkan


webView.setLayerType(View.LAYER_TYPE_HARDWARE, null);

This work for me.

like image 25
Scott Lin Avatar answered Dec 13 '25 15:12

Scott Lin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!