4

I've a layout in which Root view is CoordinatorLayout and there is a TabLayout and a ViewPager. And there are multiple fragments are initialized in viewpager using FragmentStatePagerAdapter. Some fragments are using ListView and some are using RecyclerView. But view with ListView are not scrolling properly while the view with RecyclerView are working fine. And if I'm using:

ViewCompat.setNestedScrollingEnabled(listView, true);

It only works with api level 21 or higher. Can anyone help me here. Thanks in Advance.

Prithniraj Nicyone
  • 5,021
  • 13
  • 52
  • 78
  • 2
    ListView dose not support nested scroll with pre-lollipop(api < 21). Here is similar question http://stackoverflow.com/questions/32811121/listview-nested-scrolling-on-api21 – nshmura Oct 12 '16 at 07:40
  • Yes @nshmura, thats the my question. How can we achieve it or I've to use RecyclerView. – Prithniraj Nicyone Oct 12 '16 at 07:53
  • I think the best way is to use `RecyclerView`. Maybe `ListView` with `NestedScrollView` works, but I did not try. – nshmura Oct 13 '16 at 09:43

0 Answers0