Skip to content

Commit

Permalink
fixes android pick image
Browse files Browse the repository at this point in the history
  • Loading branch information
vemarav committed Aug 24, 2021
1 parent aebf572 commit 122a714
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions example/PickImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ const PickImage = ({navigation}: PickImageProps): JSX.Element => {

const openImagePicker = () => {
ImagePicker.openPicker({
forceJpg: false,
mediaType: 'photo',
}).then(onPickedImage);
};

const onPickedImage = (image: any) => {
navigation.navigate(Routes.cropImage, {
uri: image.sourceURL,
uri: image.sourceURL || image.path,
width: image.width,
height: image.height,
});
Expand Down Expand Up @@ -109,8 +110,8 @@ export default PickImage;

const styles = StyleSheet.create({
center: {
flex: 1,
paddingTop: 40,
paddingBottom: 100,
alignItems: 'center',
backgroundColor: '#ffffff',
},
Expand Down

0 comments on commit 122a714

Please sign in to comment.