Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default class FullScreen extends Component {
- constructor(props) {
- super(props);
- const { uri } = this.props;
- this.state = {
- uri: uri,
- };
- }
- render() {
- return (
- <Image
- style={styles.image}
- source={{ uri: this.state.uri }} />
- )
- }
- }
- const styles = StyleSheet.create({
- image: {
- flex: 1,
- width: null,
- height: null,
- resizeMode: "contain",
- },
- });
- export default class FullScreen extends Component {
- constructor(props) {
- super(props);
- const { uri } = this.props;
- this.state = {
- uri: uri,
- };
- }
- render() {
- return (
- <View
- style={styles.container}>
- <TouchableOpacity
- ...>
- <Button
- style={styles.button}
- .... />
- </TouchableOpacity>
- <Image
- style={styles.image}
- source={{ uri: this.state.uri }} />
- </View>
- )
- }
- }
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: "center",
- alignItems: "center",
- },
- button: {
- zIndex: 2,
- },
- image: {
- flex: 1,
- width: null,
- height: null,
- resizeMode: "contain",
- },
- });
Add Comment
Please, Sign In to add comment