1

I'm developing an app for Android with React Native. I handle the navigation with the package React Native Navigation from Wix, and I have a doubt.

Now I have mi app working nice on my mobile, but actually, the target is for tablets. I have a sideMenu (aka Drawer) for navigation. In mobile is always closed, and I can open it with a hamburguer button on TopBar, or swiping from the left edge of screen. But, when the App is running on tablet, I want side menu was always shown, in all cases.

One way to do this is with Dimensions API and playing with height/width, even so I'm not sure that I could change the Navigation without reset all navigation and components (setRoot..).

I want achieve a behaviour like has the Settings Android App in mobile and tablets.

You may think the other famous package for navigation React Navigation is better to to achieve that?

Thanks.

sevenlops
  • 456
  • 1
  • 4
  • 18

1 Answers1

0

Use setDrawerEnabled(). To distinguish between platforms/devices you could take a look into the code in this repository (react-native-device-detection)

Mukeyii
  • 520
  • 3
  • 13
  • The first link is broken, results in 404 error. I think that you linked is for old version (V1). On the other hand, the react-native-device-detection package seems nice :) – sevenlops Feb 01 '19 at 20:36