-
Notifications
You must be signed in to change notification settings - Fork 80
Z-ordering on Android not working as expected #86
Comments
@wolfenrain @mark-veenstra I'll review this issue and the associated PRs in the upcoming week so we can get this out in the next feature release. Apologies for the delay |
@wolfenrain Can you add a PR without the usage of PR59 |
@wolfenrain Are you still working on the PR without #59 ? |
If it helps anyone this fork solved the issue for me: |
@msach22 sorry for the late response, I havent worked on it yet, but I can make some time to work on it if needed |
Any updates on this? |
@wolfenrain No worries, do you think you will have the capacity to create a PR? |
I also have the same problem |
This is a problem also in IOS |
@msach22 sorry, I haven't gotten around to it. But as we mentioned in #59 we could use a polyfill. That would make this issue useable. One such polyfill could be [webcomponentsjs] (https://github.com/webcomponents/webcomponentsjs). Using that we can have the MutationObserver that gives us #59 functionality |
Why not skip the API level 16 in the Cordova plugin. Then no changes are needed. API level 16 is also NOT supported by Cordova itself: #59 (comment) |
It might help damianrejman@db1692b |
Bug Report
Current behavior
Z-index does not fully work on Android, its either on top or on bottom but overlapping multiple views won't work
Steps to reproduce
What is the current bug behavior?
The plugin uses(by default) SurfaceViews, this particular View does not work as any normal View(More info). Because of that the
setZ
orsetTranslationZ
won't do much expect putting it in front or behind theWebView
.What is the expected correct behavior?
That the given z-index puts the right view "in front".
To do so we could use TextureViews(tokbox reference). I am not entirely sure if there is a reason for not using
TextureViews
, maybe @msach22 knows something about that.Both
TextureViews
andSurfaceViews
have their pros and cons, but in general you should try to keep the total count ofSurfaceViews
down.I have writen an implementation that makes use of the
TextureView
andMatrix
transforms. The implementation makes use of a customViewGroup
that will be used instead of theTextureView
(mPublisher.getView()
,mSubscriber.getView()
). TheViewGroup
adds theTextureView
as a child and overides thedispatchDraw
method. We then position and scale theTextureView
usingMatrix
transforms and in thedispatchDraw
we usePath
to clip theTextureView
within the given bounding rectangle.IMPORTANT
This implementation has been written and used in combination with PR49 and PR59.
I can make a PR with this implementation if required, I do belief that this is a needed feature if people want to make properly use of z-ordering on Android.
The text was updated successfully, but these errors were encountered: