В моем приложении я хочу создать страницу с расширениемListView и под ним CheckBox.ExpandableListView внутри scrollview
Моя проблема в том, что мой ExpandableListView слишком велик и сделать CheckBox на странице.
На небольших экранах не видно вообще.
Я попытался установить ExpandableListView внутри scrollview, но не работал.
Есть ли способ сделать мой дизайн?
Это мой код и скриншот.
код XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/White" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="15sp"
android:text="In this page you can save a group of exercise under one routine."
android:textColor="@color/Black"
android:textSize="20sp" />
<ExpandableListView
android:id="@+id/instructionsExView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView1"
android:layout_marginTop="15sp" >
</ExpandableListView>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/instructionsExView"
android:layout_marginTop="15sp"
android:text="If you want to open the instruction again check 'need help?'"
android:textColor="@color/Black"
android:textSize="20sp" />
<CheckBox
android:id="@+id/checkInstructions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView2"
android:layout_marginTop="16dp"
android:checked="false"
android:text="dont show again when opening the page"
android:textColor="@color/Black" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
Снимок экрана:
EDIT:
Использовать 'MergeAdapter': https://github.com/commonsguy/cwac-merge – gunar