2
ListView를 사용하고 있는데 제대로 작동하지 않습니다. 내 코드를 참조하십시오.ListView에서 'No Data'표시
<LinearLayout
android:id="@+id/playerlist"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/plist"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@id/android:empty"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="NO DATA" />
</LinearLayout>
음, 목록이 비어 있으면 잘 작동합니다.
목록이 짧기 때문에 ListView 아래에 'NO DATA'가 표시됩니다.
ListView의 layout_height를 'fill_parent'로 설정하면 '데이터 없음'이 표시되지 않습니다.
아무도 도와 줄 수 있습니까?