relative width and height image react native

Solutions on MaxInterview for relative width and height image react native by the best coders in the world

showing results for - "relative width and height image react native"
Irene
11 Sep 2017
1const dimensions = Dimensions.get('window');
2const imageHeight = Math.round(dimensions.width * 9 / 16);
3const imageWidth = dimensions.width;
4
5return (
6   <Image
7     style={{ height: imageHeight, width: imageWidth }}
8   />
9);