Open CommanderPirx opened 4 months ago
Can you show what settings you have set in sections Fullscreen media
, Deep zoomable images
and Extended details
?
Can you show what settings you have set in sections
Fullscreen media
,Deep zoomable images
andExtended details
?
Sure thing, here's a screenshot:
A similar behavior occurs when 'Automatically hide System UI when fullscreen media' is active. The UI will disappear and it's not possible to make it visible again. It's basically the reverse of the problem described, but I think it will have the same error origin.
I ran into this bug on a device running MIUI 14, where it would happen consistently on each rotation. I was able to reproduce it on a device running Android 14 (LineageOS 21) by enabling "Don't keep activities" in developer settings, then, when viewing an image, pressing the home button and returning to the app via recents.
Upon investigation, it looks like some state is lost when the ViewPagerActivity
is recreated. In particular, PhotoFragment.listener
is null after recreation, so the call listener?.fragmentClicked()
in photoClicked()
does nothing.
It seems the fragments are not recreated through MyPagerAdapter.getItem()
, which would properly set the listener, but manually instantiated by the FragmentManager. MyPagerAdapter.instantiateItem()
is still called, however, so a simple workaround would be to just set fragment.listener = activity
there.
I tested this approach, and it fixed the issue for me, so I'm opening a separate PR. Feel free to review and merge it if you're happy with it.
Checklist
Affected app version
1.1.3
Affected Android/Custom ROM version
Android 14/-
Affected device model
Pixel 7 Pro
How did you install the app?
Google Play Store
Steps to reproduce the bug
Expected behavior
Tapping on the image causes the UI's visibility to toggle, regardless of prior rotation events.
Actual behavior
If the view of the image in fullscreen view gets rotated in any of the ways listed in the repro steps, the UI becomes stuck in the visible state, and stops responding to tapping the image (which would normally cause it to be toggled invisible). This behavior persists while scrolling through different images, and even if the view is rotated again. The only way I found to get rid of it is to exit the fullscreen view and enter it again (but then if the reprosteps are repeated, it occurs again of course).
Screenshots/Screen recordings
No response
Additional information
Please note that the SimpleMobileTools's Gallery Pro app currently has a similar bug, but in their version of the app the rotating also causes the view to snap back to the image that the fullscreen mode was opened on (even if the rotation occured on a different image), and that behavior has 100% repro rate on their app, while the locking of the UI does not always occur (but it does most of the time), while on Fossify Gallery the locking UI occurs every time I try.