Issue
I can't make my WebView
wrap the displayed content. The problem is that the WebView
width is all the screen, while the height is about 300px. How can I make it wrap content and be like the file suppose to be?
Here is my current layout XML:
<WebView
android:id="@+id/animation_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
Solution
Webview is built to render HTML pages which doesn't have size. so there is no way for it to determine something that doesn't exist and re-size according to it the same way say an ImageView resizes when the src image has changed.
Your best choice is to set the size of the webview to a fixed value maybe with weight and the user will have to scroll inside it when the page is bigger than the webview itself.
Answered By - Mr.Me
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.