marudy / react-native-responsive-screen

Make React Native views responsive for all devices with the use of 2 simple methods
MIT License
1.56k stars 142 forks source link

Fix an issue where screenWidth and screenHeight could be zero #34

Open mrigo opened 5 years ago

mrigo commented 5 years ago

Often screenWidth and screenHeight are 0, because Dimensions.get('window') doesn't return the actual dimensions. If so, try to use Dimensions.get('screen').

marudy commented 5 years ago

Hey @mrigo thanks for the PR! I'm getting a maintainer pretty soon, in order to take over; we 'll have a look :) Thanks again

marudy commented 4 years ago

Hey @mrigo and happy new year! I'm having a look at it now. Can you elaborate differences between 'window' VS 'screen' please? Or link some related documentation? Thanks!

marudy commented 4 years ago

@mrigo Also which are the conditions under you are noticing 'window' to return 0 ? Never experienced that so far.