Take the 2-minute tour ×

I have a scrollview which has multiple webviews, these webviews are loading some pages. The problem is that i cannot explain so you have to see this.

The webviews upon scrolling get distorted as shown in the picture. when load for the first time they are ok.

share|improve this question
What do you mean "When load for the first time they are OK? –  Pyrodante Dec 20 '11 at 21:17
@Farhan: Putting anything that can scroll (such as a WebView) inside a ScrollView is a bad idea. OK, that doesn't exactly help you with your problem but it wouldn't surprise me if it's a contributing factor. –  Squonk Dec 20 '11 at 21:26
@Pyrodante means, when start for the first time, everything is fine, the things got bad when i scroll the view up and down –  Farhan Dec 21 '11 at 7:10
@Farhan Can we do pinch zoom to each webview in above scenario ? –  Android007 Dec 10 at 12:09
I was trying to do some thing back in 2011, but as @Squonk said, its not a good idea so i basically kind of dropped this and would advise u same. Having said that, I am also not sure if pinch zoom is applicable but if scrollview isn't registered to captur the touch events then most probably they will transfer to childs in our case webviews. –  Farhan Dec 11 at 11:38

3 Answers 3

up vote 2 down vote accepted

Yes , I got your problem. It happens because android does the caching of the elements available in the scrollview. You should use caching properly , look out for the methods.Use this link http://developer.android.com/reference/android/widget/ScrollView.html

share|improve this answer
Thanx, that works, but i play a video in one of the webview, the cache thing didn't work on that. The video was getting distort once i move the scroll up... Can you help in that? –  Farhan Dec 22 '11 at 18:25
yes thanks for explaining your problem in more detail , but i have not yet tried for video display in webview. –  Chetan Dec 27 '11 at 12:12
Can you try whenever you get time and let me know the result cz its a geniune bug... you will see once u try.. –  Farhan Dec 27 '11 at 12:16
Yes I will surely try to get back to you as soon as possible.But you too keep googling out the things :) –  Chetan Dec 28 '11 at 5:15
And one more thing , if possible can you please give me the code for reference so that I can take it forward. –  Chetan Dec 28 '11 at 5:33

Try loading each webview sequentially, meaning wait till one loads before loading the next. It might be an issue with it making parallel requests, from what I know regular browsers have limits on the number parallel requests to a given host.

share|improve this answer
As i said, when i start the program, they all loads ok. the webviews gets distorted when i start scrolling upward or downward –  Farhan Dec 21 '11 at 7:13

It's impossible to tell without seeing your XML, however you should be aware that a ScrollView can host only one direct child.

share|improve this answer
yes, i have a scrollview whose child is a linearlayout. Now this linearlayout have some webviews as childs. –  Farhan Dec 21 '11 at 7:12

Your Answer


