Farruh Habibullaev
Farruh Habibullaev

Reputation: 2392

Listview is not scrolling inside NestedScrollView

I have a situation I need to have listview inside nestedscrollview. I know this is a bad practice but i need to use. My listview strechts to parent but it is not scrolling at all. How to make listview the scrollable. Thank you.

Upvotes: 0

Views: 664

Answers (2)

user7958717
user7958717

Reputation:

It is not good practice to use the listview inside scrollview since both have scrolling they will conflict.

Anyways you can do two things to enable it: first you can setNestedViewEnabled(true) for listview but it requires API 21+

Or you can use RecyclerView.

Upvotes: 2

user5495260
user5495260

Reputation:

Try to use RecyclerView and enable setNestedViewEnabled for true. I am sure it will solve your problem

Upvotes: 2

Related Questions