How can I put a ListView into a ScrollView without it collapsing?

后端 未结 27 3243
轮回少年
轮回少年 2020-11-21 05:24

I\'ve searched around for solutions to this problem, and the only answer I can find seems to be \"don\'t put a ListView into a ScrollView\". I have yet to see any real expl

27条回答
  •  野性不改
    2020-11-21 05:49

    This is the only thing that worked for me:

    on Lollipop onwards you can use

    yourtListView.setNestedScrollingEnabled(true);
    

    This enable or disable nested scrolling for this view if you need backwards compatibility with older version of the OS you'll have to use the RecyclerView.

提交回复
热议问题