No, I mean the size of the view, for example if the content height is 500px, the size of the View is also 500px, so it wll not be able to be scrolled. My plan is actually to put it on a ScrollView, with a ListView under the WebView. It behaves like a 'related articles' button in an RSS reader.
That's not what I meant. I uploaded a picture to illustrate my point. The green area is the ScrollView, the grey area is the WebView, and the blue area is the ListView. The layout height of the WebView is following the height of the HTML content.
I see. This is what I understood from your first post. What I meant to say is that the WebView content size is dynamic. The user is expected to zoom and and out as needed.
You can probably inject JavaScript with WebViewExtra library and find the body height. Though I'm not sure that the result will be better than just setting the WebView size based on the device screen size.
OK, I'll try. One more question; does Basic4android accept the height unit returned by the Javascript? Or should I convert it into a different unit, so that the WebView will have the same height that is returned by the Javascript?
Assuming that the height unit is pixels then you should just set it as the height. If is is scaled pixels then you can call DipToCurrent to convert it to pixels.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.