Android: ScrollView vs NestedScrollView

Chintan Soni picture Chintan Soni · Jan 13, 2016 · Viewed 112k times · Source

What is the difference between ScrollView and NestedScrollView? Both of them, extend FrameLayout. I want to know in depth pros and cons of both of them.

Answer

Roshan picture Roshan · Jan 13, 2016

NestedScrollView as the name suggests is used when there is a need for a scrolling view inside another scrolling view. Normally this would be difficult to accomplish since the system would be unable to decide which view to scroll.

This is where NestedScrollView comes in.