react-native(리액트 네이티브) component - ViewPagerAndroid


import React, { Component } from 'react'
import {
ViewPagerAndroid,
View,
Text,
StyleSheet,
} from 'react-native'

export default class App extends Component {
render() {
return (
<ViewPagerAndroid
style={styles.viewPager}
initialPage={0}>
<View style={styles.pageStyle} key="1">
<Text>First page(swipe right direction)</Text>
</View>
<View style={styles.pageStyle} key="2">
<Text>Second page</Text>
</View>
<View style={styles.pageStyle} key="3">
<Text>Third page</Text>
</View>
</ViewPagerAndroid>
);
}
}
const styles=StyleSheet.create({
viewPager: {
flex: 1,
},
pageStyle: {
alignItems: 'center',
padding: 20,
},
})


+ Recent posts