From 74ec3e09dad2bd80d874837673875b23efaa3ca6 Mon Sep 17 00:00:00 2001 From: Ran Greenberg Date: Tue, 28 Feb 2017 15:43:33 +0200 Subject: [PATCH] custom button in the grid now will open the camera screen (iOS only) --- example/AlbumsScreen.ios.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/example/AlbumsScreen.ios.js b/example/AlbumsScreen.ios.js index 6b46267..59623e4 100644 --- a/example/AlbumsScreen.ios.js +++ b/example/AlbumsScreen.ios.js @@ -19,6 +19,7 @@ import { import _ from 'lodash'; import GalleryScreen from './GalleryScreen'; +import CameraScreen from './CameraScreen'; const {height, width} = Dimensions.get('window'); @@ -33,7 +34,8 @@ export default class AlbumsScreen extends Component { albums: [], dropdownVisible: false, images: [], - imagesDetails: undefined + imagesDetails: undefined, + shouldRenderCameraScreen: false } } @@ -65,6 +67,13 @@ export default class AlbumsScreen extends Component { } render() { + + if (this.state.shouldRenderCameraScreen) { + return ( + + ); + } + return ( - - @@ -114,8 +121,14 @@ export default class AlbumsScreen extends Component { ); } + renderCameraScreen() { + + return + } + onCustomButtonPressed() { console.log('RANG', 'custom button pressed'); + this.setState({shouldRenderCameraScreen: true}); } renderImagesDetails() {