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,
},
})
'프로그래밍(Programming) > 리액트 네이티브(React Native)' 카테고리의 다른 글
react-native(리액트 네이티브) API - Alert (0) | 2019.01.07 |
---|---|
react-native(리액트 네이티브) component -WebView (0) | 2019.01.07 |
react-native(리액트 네이티브) component - View (0) | 2019.01.07 |
react-native(리액트 네이티브) component - Touchable (0) | 2019.01.07 |
react-native(리액트 네이티브) component - TextInput (0) | 2019.01.07 |