lodev09 / react-native-true-sheet

The true native bottom sheet experience 💩
https://sheet.lodev09.com
MIT License
394 stars 12 forks source link

Android Edge to edge support #72

Open SickanK opened 1 month ago

SickanK commented 1 month ago

Yesterday, I created ticket #69 regarding a color change in the bottom navigation bar. Upon further investigation, I realized that the color change was due to the backdrop showing through the transparent color I had set for the navigation bar. A similar issue with edge-to-edge on android was previously reported in ticket #50, which has since been closed.

Description: When using react-native-unistyles, which automatically sets Android to edge-to-edge mode, the sheet floats above the navigation bar. I've also set the color of the navigation bar to transparent for the effect to be noticeable. In the provided reproduction, you can see the text showing through the navigation bar.

Reproduction: https://github.com/SickanK/react-native-true-sheet-edge

Images: Screenshot_20240721-030458 Screenshot_20240721-030350

lodev09 commented 1 month ago

Okay. thanks for investigating.. Looks like I just need the sheet to detect if edge to edge is enabled. I have yet to explore on that feature on Android..

I'm kind of occupied at the moment, but I'm open to PRs :)

SickanK commented 1 month ago

I gave it a try for an hour, but my skills aren't up to the task. Looks like I'll just have to wait for now! :)

lodev09 commented 1 month ago

@SickanK no worries.. I can understand, android doesn't make things easy like IOS :D

lodev09 commented 1 month ago

I tried looking for solution on this but couldn't find one that works. I honestly think this is an issue with Android bottom sheet itself lol.

I'll pin this and maybe someone that knows android can fix this for us 😅

a-eid commented 1 month ago

@lodev09 there is no way to detect edge-to-edge on android, however you could add it as an optional prop to the true sheet component.

checkout

react-native-controller RN unistyle 1 RN unistyle 2

lodev09 commented 1 month ago

Yes that's what I thought, by using a prop boolean. My main issue is that I couldn't find a working code that moves the sheet at the bottom edge.