react-native-responsive-screen
react-native-responsive-screen copied to clipboard
Make React Native views responsive for all devices with the use of 2 simple methods
Solved: `const [ state, setstate ] = React.useState(null);` `React.useEffect(() => {` `listenOrientationChange(setstate);` `return () => {` `removeOrientationListener();` `};}, []);` And Package: `if (that.setState == null) {` `that(screenWidth < screenHeight ?...
Hi. I found an issue in height calculation for android. There is a known issue for android height definition. Reference: https://qiita.com/uutarou10/items/1aad5fd2d03fb54e0dbf **For iOS, height of window and screen is the...
hi, for this code i get a error : Error:Failed to parse decleration margin:13 in styled-compnent usage ``` const ViewCoverHeader =styled.View` margin:${wp('2%')}; `; ``` **update**: i added **px** at the...
Solved Issues #69. Please merge
This is a fix for #28 Before this PR: After this PR:
Often screenWidth and screenHeight are 0, because Dimensions.get('window') doesn't return the actual dimensions. If so, try to use Dimensions.get('screen').
Hi, The width and height not changing on orientation changes. The value remains the same while changing the orientation. Thanks
As [lschuft](https://github.com/marudy/react-native-responsive-screen/issues/21#issue-411735171) mentioned it's not a good approach to meth the component's props, instead the `listenOrientationChange` may return the original handler, store it somewhere and push it back to `removeOrientationListener`
Hi there, thank for you for this package. I'm using it in the Login screen of an app I'm making, and I'm having an issue using the removeOrientationListener method. When...
I currently have an app that uses External JS/style files that exports different StyleSheet.create() objects, which will be reused across the app. In your example of detecting orientation changes, you...