Android Question Webview scrolling not as smooth as chrome browser scrolling

JohnC

Expert
Licensed User
Longtime User
I am using Webview and adding the ChromeClient to it.

I am noticing that vertical scrolling of pages are not very smooth as compared to opening the same page in a Chrome browser app on the same phone.

Any ideas why?
 

JohnC

Expert
Licensed User
Longtime User
I tried it but it doesn't seem to do anything.

The problem is two-fold:

1) If I swipe up or down, sometimes the page will continue to scroll and "slowly" come to a stop, which is normal and desired. Other times, the page will *immediately* stop as soon as my finger lifts up from the screen after a swipe up/down - not the greatest UX that the user is accustomed to.

2) The other problem, which is MUCH worse, is that as I am swiping up/down, the view will start scrolling in the desired direction, but as soon as my finger lifts up from the screen, the screen will jump BACK to the original scroll position it was in before I even touched the screen!

The client is complaining about this adverse scrolling response and I don't know what to do :(
 
Last edited:
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Since your suggestion mentioned "Hardware", for kicks and giggles I ENABLED hardware acceleration in the manifest (it was disabled):
B4X:
SetApplicationAttribute(android:hardwareAccelerated, "true")
And at least on my device, the scrolling seems much better now.

But, I remember older threads saying to keep hardware acceleration disabled when using webview because it can cause webpages to render blank pages. So, I don't know if that was just an issue with older android versions.

So, I sent the client the new build with hardware acceleration enabled and keeping my fingers crossed...

UPDATE: The client says the scrolling is much better :)
 
Last edited:
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Last edited:
Upvote 0
Top