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.
Actually, it is possible to put a ListView
inside of an ScrollView
. In some use cases (e.g. dynamic menus/submenus it's a reasonable solution). However, two caveats apply:
requestDisallowInterceptTouchEvent()
) but it's hard to make them work correctly in all cases.LayoutParams
). Setting WRAP_CONTENT
will not work.