Here’s the layout for a custom Alert Dialog I’ve been working on. It’s just a TextView with a CheckBox underneath:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/help_dialog_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp" />
</ScrollView>
<CheckBox
android:id="@+id/display_help_dialogs_checkbox"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="@string/display_help_dialogs" />
When the TextView’s textSize is sufficiently large (i.e. when the ScrollView is actually “put to use”), the CheckBox is nowhere to be seen.
Thanks for the help,
Mitchell
I believe your
ScrollViewis pushing theCheckboxoutside the bounds of the layout. Try something like this:You may need to specify dimensions of the scrollview in this case, but what should happen is the
LinearLayoutbecomes bigger than the area designated in theScrollView. TheScrollViewwill then allow the user to scroll down the layout to see the rest.