I'm trying to fill an AlertDialog with a WebView and a CheckBox with the following RelativeLayout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<WebView
android:id="@+id/webcontent"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/checkBox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/webcontent"
android:layout_marginLeft="7dp"
android:textColor="#ffffff" />
</RelativeLayout>
According to my research here and here. In my code, instead of using the alertDialog.setMessage()
, I used the above layout by calling alertDialog.setView(...)
and then it works well for the short text. When the WebView content becomes very long that I need to scroll several times to reach the buttom, the CheckBox
can't be displayed even when scrolling to buttom of the webview. Could somebody help me? Thanks in advance.