In my custom dialog, I am trying to get my checkbox to stay underneath my scrollview but it's not working. I've tried adding the checkbox under the scrollview in xml but it doesn't appear whenever I run the app. What needs to be done in order for the checkbox to remain at the bottom of the dialog (underneath the scrollview), and not be part of the scrollview when I scroll that? I don't want my checkbox to scroll with the scrollview at all.
java
LayoutInflater inflater = LayoutInflater.from(this);
View dialog_layout = inflater.inflate(R.layout.fragment_overlay, (ViewGroup) findViewById(R.id.Overlay_linearLayout));
AlertDialog.Builder db = new AlertDialog.Builder(this);
db.setView(dialog_layout);
db.setPositiveButton("OK", new DialogInterface.OnClickListener() {
});
db.show();
xml
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/Overlay_linearLayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/Overlay_scrollView"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/Overlay_tableLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:weightSum="1.0">
<TableRow
android:padding="10dp">
<ImageView
android:layout_width="0px"
android:layout_weight="0.3"
android:layout_height="80dp"
android:src="@drawable/img_0" />
<TextView
android:id="@+id/MapOverlay_textView0"
android:layout_width="0px"
android:layout_weight="0.7"
android:text="@string/overlay_instruction0" />
</TableRow>
<TableRow
android:padding="10dp">
<ImageView
android:layout_width="0px"
android:layout_weight="0.3"
android:layout_height="80dp"
android:src="@drawable/img_1" />
<TextView
android:id="@+id/MapOverlay_textView1"
android:layout_width="0px"
android:layout_weight="0.7"
android:text="@string/overlay_instruction1" />
</TableRow>
<TableRow
android:padding="10dp">
<ImageView
android:layout_width="0px"
android:layout_weight="0.3"
android:layout_height="80dp"
android:src="@drawable/img_2" />
<TextView
android:id="@+id/MapOverlay_textView2"
android:layout_width="0px"
android:layout_weight="0.7"
android:text="@string/overlay_instruction2" />
</TableRow>
<TableRow
android:padding="10dp">
<ImageView
android:layout_width="0px"
android:layout_weight="0.3"
android:layout_height="80dp"
android:src="@drawable/img_3" />
<TextView
android:id="@+id/MapOverlay_textView3"
android:layout_width="0px"
android:layout_weight="0.7"
android:text="@string/overlay_instruction3"
style="@android:style/TextAppearance.Medium" />
</TableRow>
<TableRow>
<CheckBox
android:text="Don't show this again"
android:id="@+id/skip"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
</ScrollView>