How can i have a ListView inside a NestedScrollView

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.


Well, I would suggest you 2 ways to solve that problem:

1) Try to make LinearLayout a header of your ListView. Note that header should be inflated as it is written here.

2) You mentioned that you use NestedScrollView, so maybe you should also try to replace ListView inside NestedScrollView with LinearLayout, as wise people suggested here, adding row views in loop similar to how your adapter works.

Good luck!