1.在listview的父布局加入以下属性
android:descendantFocusability="blocksDescendants"
2.举例说明
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:descendantFocusability="blocksDescendants"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<app.goa.com.ydbgnew.utils.MyListView
android:paddingBottom="10dp"
android:paddingLeft="15dp"
android:divider="@null"
android:id="@+id/fujian"
android:layout_width="match_parent"
android:layout_height="wrap_content"></app.goa.com.ydbgnew.utils.MyListView>
</LinearLayout>
</ScrollView>
网友评论