1
다음은 대화 상자의 코드입니다.레이아웃 문제 : ExpandableListView가 포함 된 대화 상자
<?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:layout_margin="5dp"
android:orientation="vertical" >
<CheckBox
android:id="@+id/source_select_public"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/source_select_public" />
<ExpandableListView
android:id="@+id/source_select_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:groupIndicator="@android:color/transparent" />
<LinearLayout
android:id="@+id/source_select_commands"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:orientation="horizontal" >
<Button
android:id="@+id/source_select_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@android:string/cancel" />
<Button
android:id="@+id/source_select_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@android:string/ok" />
</LinearLayout>
</LinearLayout>
ExpandableListView가 열려 있으면 자동으로 스크롤 할 수 있습니다. 그러나 아래에있는 두 개의 단추가 사라집니다. ScrollView 내에서 전체 레이아웃을 둘러싸고 시도했지만 ExpandableListView의 스크롤 가능한 비헤이비어가 깨졌습니다 (즉, 실제로 만지기에는 너무 작아집니다). 내가 달성하고 싶은 것은 ExpandableListView를 스크롤 가능한 유일한 구성 요소로 허용하면서 모든 화면을 차지할 수있는 대화 상자입니다. 누군가 날 도와 줄 수 있니?