Issue
I implemented a little android webview
into a DialogFragment
. I set a little text programmatically with the method: webView.loadData(myString, "text/html", "utf-8");
my xml layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id/id_layout_list_dialog"
style="@style/Window.Dialog"
android:orientation="vertical">
...
<WebView
android:id="@+id/id_webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
...
</LinearLayout>
The problem: the problem is the Dialog goes up and down continuously. If I don't call the webView.loadData
method the problem disappears.
Moreover, the first time I call the Dialog, it is still. The second time it start goes up and down continuosly.
Why I get this issue? How I can solve it?
Solution
Ok, I solved this issue simply change height from match_parent
to wrap_content
<WebView
android:id="@+id/id_webview"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Answered By - capo11
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.