これは私のレイアウトです:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:textSize="15sp"
android:textStyle="bold"
android:textColor="@android:color/holo_blue_dark"
android:text="@string/section_1" />
<ListView
android:id="@+id/lv_section_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:textSize="15sp"
android:textStyle="bold"
android:textColor="@android:color/holo_blue_dark"
android:text="@string/section_2" />
<ListView
android:id="@+id/lv_section_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="false" />
</LinearLayout>
問題は、最初のセクションに多くの項目があり、画面全体を占める場合、スクロールして2番目のセクションを表示できないことです。ListView
クイック検索で、内では使用できないことがわかりScollView
ました。
LinearLayout
追加できるすべてのセクションを表示できるように、このスクロール可能のままにする方法はありますか?iOS UITableViewに似たもの、いくつかのセクションとヘッダーが必要です。
前もって感謝します。