내 ListView
은 화면이 짧고 전체 화면을 채우지 못하는 경우에 대비하여 onScroll 이벤트를 수신하지 않습니다. 이상한 것은 fill_parent
을 높이로 설정했기 때문입니다. 내 레이아웃 :ListView가 스크롤 할 수 없음
<?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="match_parent"
android:background="@drawable/bg_login_screen3"
android:orientation="vertical" >
<CheckBox
android:id="@+id/overview_allcars_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/all_cars"
android:textSize="14sp" />
<LinearLayout
android:id="@+id/list_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:cacheColorHint="#00000000"
android:fadingEdge="horizontal"
android:scrollingCache="true" />
</LinearLayout>
</LinearLayout>
아마도 match_parent 대신에 fill_parent가 최고 linearLayout의 높이가 될 것입니다 .. – Daler
fill_parent와 match_parent는 동일하다고 생각합니다. 그들은 똑같이 행동합니다. – slezadav