React Native Vertical ScrollView Android iOS Example Tutorial

How to create simple vertical ScrollView in react native android iOS application and show multiple View components inside ScrollView vertically align center.

In this tutorial we would going create a simple react native application using ScrollView. ScrollView is a type of container component that can itself contain or host multiple child components like View, Button, Image ETC. Developer can add as many components in ScrollView as he required and all the View will be align vertically automatically. So let’s get started

Contents in this project Vertical ScrollView :

1. Start a fresh React Native project. If you don’t know how then read my this tutorial.

2. Add AppRegistry, StyleSheet, ScrollView, Text, Image, View component in import block.

3. Add ScrollView component in render’s return block.

4. Add View inside the ScrollView.

5. Create custom Style sheet class just above the AppRegistry.registerComponent line. Using this Style we are setting up all the child elements which we would have added in View’s align center.

6. Call the Style class MainContainer in View .

7. Define Two Text components and Two Image components in View.

8. Complete Source Code for index.android.js file :

Screenshots :

ScrollView