Using a ScrollView

The ScrollView is a generic scrolling container that can contain multiple components and views. The scrollable items can be heterogeneous, and you can scroll both vertically and horizontally (by using ScrollView and HorizontalScrollView components).

This example creates a vertical ScrollView with both images and text mixed together.

The ScrollView works best to present a small number of things of a limited size. All the elements and views of a ScrollView are rendered, even if they are not currently shown on the screen. If you have a long list of items which cannot fit on the screen, you should use a Recycler view instead. So let's learn about list views next.