Fork me on GitHub
#cljsrn
<
2020-07-23
>
lepistane16:07:29

how do you guys deal with width on different devices? i have split screen and right side of the screen should be populated with grid like views by default i should see 5 columns on all devices (column width should adjust to the device) but i am failing to deal with this does anyone have any suggestion? i've played with https://github.com/marudy/react-native-responsive-screen but the % is different for each device lets say nexus_s column width should be 12.7% and on pixel_2 it should be 10.7% i tried working with flex but i am getting weird behavior because text inside column is variable and when there is little bit of text column width shrinks. any ideas would be helpful

Oliver George22:07:35

You have dimensions to play with:

Oliver George22:07:15

Based on that you can create adaptive templates.

Oliver George22:07:05

I did go looking for a react native implementation of the material design grid system at one point. Something like that could save some pixel math for common layouts.