Android list view inside a scroll view

后端 未结 30 2057
一向
一向 2020-11-21 13:43

I have an android layout which has a scrollView with a number of elements with in it. At the bottom of the scrollView I have a listView

30条回答
  •  鱼传尺愫
    2020-11-21 13:43

    You should never use a ScrollView with a ListView, because ListView takes care of its own vertical scrolling. Most importantly, doing this defeats all of the important optimizations in ListView for dealing with large lists, since it effectively forces the ListView to display its entire list of items to fill up the infinite container supplied by ScrollView.

    http://developer.android.com/reference/android/widget/ScrollView.html

提交回复
热议问题