Guest User

Untitled

a guest
Oct 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. export default class FullScreen extends Component {
  2. constructor(props) {
  3. super(props);
  4.  
  5. const { uri } = this.props;
  6.  
  7. this.state = {
  8. uri: uri,
  9. };
  10. }
  11.  
  12.  
  13. render() {
  14. return (
  15. <Image
  16. style={styles.image}
  17. source={{ uri: this.state.uri }} />
  18. )
  19. }
  20. }
  21.  
  22. const styles = StyleSheet.create({
  23. image: {
  24. flex: 1,
  25. width: null,
  26. height: null,
  27. resizeMode: "contain",
  28. },
  29. });
  30.  
  31. export default class FullScreen extends Component {
  32. constructor(props) {
  33. super(props);
  34.  
  35. const { uri } = this.props;
  36.  
  37. this.state = {
  38. uri: uri,
  39. };
  40. }
  41.  
  42.  
  43. render() {
  44. return (
  45. <View
  46. style={styles.container}>
  47. <TouchableOpacity
  48. ...>
  49. <Button
  50. style={styles.button}
  51. .... />
  52. </TouchableOpacity>
  53. <Image
  54. style={styles.image}
  55. source={{ uri: this.state.uri }} />
  56. </View>
  57. )
  58. }
  59. }
  60.  
  61. const styles = StyleSheet.create({
  62. container: {
  63. flex: 1,
  64. justifyContent: "center",
  65. alignItems: "center",
  66. },
  67. button: {
  68. zIndex: 2,
  69. },
  70. image: {
  71. flex: 1,
  72. width: null,
  73. height: null,
  74. resizeMode: "contain",
  75. },
  76. });
Add Comment
Please, Sign In to add comment