-
-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC + WIP: FullWindowOverlay on android #2421
Conversation
6f081fc
to
aff56dc
Compare
aff56dc
to
a2afc13
Compare
Hi, thanks for this PR! The problem is a little bit more complex, I started to work on it but needed to switch focus to something else. Correct me if I'm wrong:
We need to try to tackle those problems because in this state it doesn't give us any advantage over RN Modal. I've created a draft with my changes - the PR #2425 is messy, but it may give you some insights - I was able to solve some of the problems: As far as I remember crashes can be solved by hardcoding the ID for the view: Line 51 in 2bd05f4
Passing events could be solved by dispatching the event to RootView of the FullWinowOverlay (the placeholder): Line 173 in 2bd05f4
react-native-screens/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp Line 27 in 2bd05f4
To go edge to edge I used different LayoutParams and setting width height in ShadowNode: Line 75 in 2bd05f4
Line 60 in 2bd05f4
Being on top of everything: Line 78 in 2bd05f4
Btw. I'm not saying any of those solutions are the best approaches to tackle the issues - I'm open for discussion. Once again thanks for spending the time, and I'd be thrilled to work with you on getting it done. |
Thanks for your work! I'll continuing implementation in #2733. |
Description
FullWindowOverlay implementation for android
TODO:
Changes
The implementation is adding a FullWindowOverlayRootView to the window for every FullWindowOverlay, FullWindowOverlay on native side is just a placeholder.
Screenshots / GIFs
Test code and steps to reproduce
See:
https://github.com/mfazekas/react-native-screens/blob/6f081fc33f1b8165df194eb3dd9ee42504c0d415/apps/src/tests/TestFullWindowOverlay.tsx#L1C1-L30C2
Checklist