Screen width in React Native

The Solution to Screen width in React Native is

In React-Native we have an Option called Dimensions

Include Dimensions at the top var where you have include the Image,and Text and other components.

Then in your Stylesheets you can use as below,

ex: {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height

In this way you can get the device window and height.

~ Answered on 2015-11-19 15:02:25

Most Viewed Questions: