Android: Listview inside ScrollView

后端 未结 4 1892
抹茶落季
抹茶落季 2021-01-23 17:35

I want to have a layout that can scroll and a listview inside it. The listview will expand it\'s height base on how many items in it. Only the ScrollView outside is scrollable.

4条回答
  •  执笔经年
    2021-01-23 18:37

    Don't put ListView inside ScrollView - first rule of android clud :) Instead you can use simple LinearLayout and manage you ListView items inside it. Or you can add Header/Footer Views to the ListView and using it without scrollview.

提交回复
热议问题