Created
May 7, 2018 16:49
-
-
Save brunocarvalhodearaujo/4728c9006ebfc33f4bce1cbdbdbbfb08 to your computer and use it in GitHub Desktop.
preview pdf react native app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, StyleSheet, WebView } from 'react-native'; | |
import { Constants } from 'expo'; | |
export default class App extends Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<WebView | |
bounces={false} | |
scrollEnabled={false} | |
source={{ uri: 'http://www.africau.edu/images/default/sample.pdf' }} /> | |
</View> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
paddingTop: Constants.statusBarHeight, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment