root-two/react-native-drawer

drawer width decreases on open and close

adnan1naeem opened this issue · 9 comments

I was having issue of drawer width .when i open and close and then reopen the drawer width was closed.It continuously decrease after reopening it.I found its solution kindly replace 210 line of react-native-drawer/index.js componet with the following line.Then it would be resolved .Kindly update and release this version.

instead of this ----> drawerProps[this.props.side] = -this.getDeviceLength() + this._offsetOpen + this._length

place this-----> drawerProps[this.props.side] = Math.round(-this.getDeviceLength() + this._offsetOpen + this._length)

This still doesn't work for devices X and X plus devices. Can anyone update on this issue. I am using this in production and its breaking things

Hi guys. You should pass props styles for correct setting initial position of drawer

styles  = {{
  drawer: { shadowColor: '#000000', shadowOpacity: 0.8, shadowRadius: 3 },
  main: { paddingLeft: 3 },
}};

With this prop Drawer works correctly

Hello, @Dimon70007! Have you tested it on an iPhone X? Because it doesn't help me :(

Hello, @Dimon70007! Have you tested it on an iPhone X? Because it doesn't help me :(

Hi @demothreen. Drawer from "native-base": "^2.12.1" works fine for me.
You can try my code - https://gist.github.com/Dimon70007/56a0e526dade746b3bc967e8ee72011d

confirm - on Iphone XS have reproduced this bug
Same bug appears when using absolute positioning with animating. but with

transform: [{
      translateX: value,
    }],

animating works fine on iphone

I have found solution - #352 (comment)

Hi @demothreen. You can try #372 in your project.

Hi @Dimon70007! I have not tried your changes. For my project I have already used DrawerLayout from "react-native-gesture-handler" - for ios and android works great for me!

Hi @Dimon70007! I have not tried your changes. For my project I have already used DrawerLayout from "react-native-gesture-handler" - for ios and android works great for me!

Thank you very much. I've adopted this DrawerLayout for my App. It looks better then js Drawer.