views:

22

answers:

0

I've currently got a webview that when loading has a "loading message" pop down at the top of the screen above it (but the message doesn't fill the whole screen so you can see some of the content it covers). When this happens, I want the scrollable area of the webview to increase to accommodate for the message (and this increased area to be the default background colour of the webview - say black) so that you can sort of over-scroll at the top of the view, so you can view all of the content.

Using webView.scrollTo(x, -heightOfLoadingView), I can set the current scroll position to show the whole page below the loading message (with the background defaulting to black) but this is only a temporary move and not an increase in the actual scrollable area.

I've tried setting the padding of the webview to the height of the loading message, but the ScrollView of the WebView doesn't take account of the padding - is it possible to make the scrolling take account of the padding as this would be an easy solution?

How can I add content to the scrollable area. Are there any methods that I can use to do this so I can add just a black rectangle at the top of the scrolling view? Remember this is a webview so it currently deals with all scrolling automatically.

Cheers.