Closed goodibunakov closed 4 years ago
@goodibunakov have you tried to handle the insets for your video frame by setting it to fitsSystemWindows = false?
or use something like that to handle insets? https://gist.github.com/PaeP3nguin/4e41f7e76be452fe2f78d3c534fb8dd1
v8 kind of tries to make full use of the system and just work with the APIs and insets the way they were meant.
previous v8 we would try to magically handle things which took away too much control from devs
If I understood correctly, i can leave fitsSystemWindows="true" for DrawerLayout and put my videoView in InsetFrameLayout in xml?
so basically the fitsSystemWindow will tell the DrawerLayout that it can handle insets, and via that then the material drawer can handle its insets.
if you manually handle insets then for your video view that may be already sufficient. but you'd need to try it.
Also did you. have a look at the "FullscreenDrawer" sample activity?
It shows how the content can draw behind the statusbar
Thanks Mike!
Please let me know if that helps. if not it would be great if you could create a sample to showcase the problem which makes it easier to assist / fix it :)
Well, FullscreenDrawer helped.
I use ViewCompat.setOnApplyWindowInsetsListener(root) { view, insets -> rootLayout.updatePadding(top = insets.systemWindowInsetTop) insets }
where root is DrawerLayout and rootLayout is RelativeLayout inside DrawerLayout and it works!
Glad it works :)
I'm sorry but... What determines the width of the shadow? How fix shadow shift? Maybe something like slider.method() in OnApplyWindowInsetsListener? I use onConfigurationChanged() and shadow shift after first device rotate.
Which shadow @goodibunakov ? Is this reproducible in the sample app?
After rotate i have this. I cant find the way to fix it.
This doesn't seem to happen in the sample.
Could it be that you have a fitsSystemWindows
flag somewhere in a not so good position perhaps?
Mike, so what determines the width of the shadow? I mean this dark area.
Looks to me to be the fitsSystemWindows
flag (from the Android system) which will apply the shadow for the navigation bar.
In sample you set fitsSystemWindows = false (FullScreen) but you not use onConfigurationChanged(). If i remove android:configChanges from AndroidManifest everything is ok. But i have to use android:configChanges. And... I can't find what and where to do to fix this shadow :(
Usually those insets come from the system and are handled by it. but as you opt in to handle those manually :/
I guess that may results in the fitsSystemWindows true no longer working for the drawer itself.
does your theme somehow specify a transparent system UI?
I have no transparency. I use youtube-player library. Activity has android:configChanges="orientation|screenSize|keyboardHidden|smallestScreenSize|screenLayout" in manifest. After device rotate player goes to fullscreen it somehow set landscape. When player goes back - orientation again set portrait. And here i have my problem. fitsSystemWindows is setted for MaterialDrawerSliderView, not for DrawerLayout. If i set fitsSystemWindows for DrawerLayout, player fill not fullscreen, navigation bar stay.
this behavior can't be controlled by the view itself. either you want to be drawn behind system bars. that requires the fits system windows flags. or without it, it can't draw behind :(
I am afraid I don't know a good alternative to it :(
Hi Mike! Is there any way to use your lib without android:fitsSystemWindows="true"? I use one lib for youtube and if set android:fitsSystemWindows="true" videoframe not match parent when fullscreen on. But without fitsSystemWindows drawer looks crazy ))))
So, can you help?