1

Very general question: I have multiple widgets in a ScrollView Android app. A standard ScrollView, mobile can show say 720 lines and user can scroll down then back up going thru multiple widgets (text panes, buttons etc). Problem is that I want to add a WebView that will display an HTML table; the height of this HTML table will be variable size.

Is there a way to change the height of the WebView based on the size of the HTML table it should display?

2 Answers 2

1

Yes, you can get a reference to the WebView, then set the height of it, with the setHeight attribute.

Maybe you would be better off letting the container take care of that for you, and set the attribute to "wrap_content".

Sign up to request clarification or add additional context in comments.

Comments

0

I guess, you need to calc web-view content size (here and here and enter link description here), than set webview size to content fits (maybe here). In that way you should have only scrollview scrolling.

Good luck

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.