-
Notifications
You must be signed in to change notification settings - Fork 61
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
Android ZOrder for transparent surfaceView #460
Android ZOrder for transparent surfaceView #460
Conversation
I couldn't find any more info on this. What is the difference between these two functions in practice? https://developer.android.com/reference/kotlin/android/view/SurfaceView#setzordermediaoverlay
https://developer.android.com/reference/kotlin/android/view/SurfaceView#setzorderontop
|
|
...bylonjs/react-native-iosandroid/android/src/main/java/com/babylonreactnative/EngineView.java
Outdated
Show resolved
Hide resolved
|
…va/com/babylonreactnative/EngineView.java Co-authored-by: Ryan Tremblay <[email protected]>
Yes, it's not topmost on Android anymore (as it's still on iOS). It's topMost on other surfaceViews. It's platform specific behaviors. I don't see any obvious name for that. Or even if just a name change is enough. |
It seems like this flag is no longer consistent across platforms with this change. That seems bad. I wonder if it makes sense to expose the underlying platform view and the application can do whatever it wants with it? |
Do you mean exposing a MTKView or a surfaceView to JS? Or asking user to add a bridge between the native view and JS? |
I'm not sure. Is there already an existing JS visible interface for talking to the native view? I'm guessing no. |
What I've seen in other RN components is having props that are platform specific and documented as such. In this specific case, what is the behavior you are trying to achieve? It seems like maybe there is a SurfaceView, and then the BRN EngineView is supposed to go on top of that, but then UI is supposed to go on top of everything? Although that's not the behavior we'd have on iOS, right? So yea, maybe if you can explain a little more scenario that will help with figuring out a reasonable set of props across platforms. |
The scenario is quite simple actually: when isTransparent is true for the EngineView, there is nothing to do on iOS or Windows except. |
...bylonjs/react-native-iosandroid/android/src/main/java/com/babylonreactnative/EngineView.java
Outdated
Show resolved
Hide resolved
...bylonjs/react-native-iosandroid/android/src/main/java/com/babylonreactnative/EngineView.java
Outdated
Show resolved
Hide resolved
...bylonjs/react-native-iosandroid/android/src/main/java/com/babylonreactnative/EngineView.java
Outdated
Show resolved
Hide resolved
It would be good if @ryantrem can review as well before I sign off. |
Co-authored-by: Ryan Tremblay <[email protected]>
Co-authored-by: Ryan Tremblay <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good from my perspective.
As discussed offline, add a new
androidView
property and removeisTopMost