Closed blonsky95 closed 3 years ago
Thx for the report. My first guess would be that it might be related to orientation changes (or config changes) in general, not sure what android does with the app's configuration when the notification window opens. Would definitely need some more investigation to be able to track down the cause.
Ok, actually you can close this, even though I tried multiple combinations in the past few days, today I tried a new combination and it worked. Nothing to do with this library.
Just added a few "LAYOUT flags" to the visibility call. Without them some gestures cause a redraw of the layout or something, but it works like a charm now.
(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
// Set the content to appear under the system bars so that the
// content doesn't resize when the system bars hide and show.
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
//These hide nav and status bar
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_FULLSCREEN)
Sorry for the inconvenience!
No worries, glad it is working for you now 😄
First of all, I am not entirely sure if the problem lies in this great repo or if within the Android framework, but I'm sure that no one is going to know it better than you guys.
I use ZoomSurfaceView to analyse video, the reason I went with this library is the ease with which I can enable zooming and panning, which was all I needed. The bug/problem I'm experimenting is that when I have my device in landscape, and with fullscreen mode enabled, notifications and status bar drag downs cause the zooming/panning to reset. This does not happen in Portrait mode, nor in the ZoomLayout or imageview in the sample app. Its only on the ZoomSurfaceView, when in landscape, and in fullscreen.
To Reproduce
You can reproduce the bug in the demo app:
To enable the fullscreen all I did is add these 3 lines of code to the ZoomSurfaceView button like so:
Expected behavior
Run the app
Go landscape orientation
Go to video (If you added the fullscreen lines of code, it will make it go full screen, status bar and nav bar should not be visible)
zoom in
Drag the status bar down (dont have to go all the way down, partial is fine) - you can also send yourself a notification, triggers the same problem
Zoom/Pan is reset to original (BUG)
Repeat in portrait, or without fullscreen, or in the Image tab, and it works fine, its just when landscape+ZoomSurfaceView+Fullscreen
XML layout
Same as demo app
Screenshots
Can record my screen and put it up here if needed
Other
What annoys me is not user dragging down the status bar, its the notifications which can come at any time and cause the same reset, I only mentioned the status bar drag as it is more replicable. Imagine carefully analysing a video in slow motion with zoom but then you get a notification which triggers the zoom to reset so you need to start again, but you might keep interrupted constantly.