Skip to content
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

Rotating the view when viewing fullscreen media causes the UI to get stuck visible #275

Open
7 tasks done
CommanderPirx opened this issue Jul 30, 2024 · 4 comments · May be fixed by #339
Open
7 tasks done

Rotating the view when viewing fullscreen media causes the UI to get stuck visible #275

CommanderPirx opened this issue Jul 30, 2024 · 4 comments · May be fixed by #339
Labels
bug Something is not working device/software specific Issues that only happen on some devices or with some specific hardware/software

Comments

@CommanderPirx
Copy link

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

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

  1. Open any folder with images
  2. Click on an image in order to go to the fullscreen view
  3. Rotate the view of the image by any of the listed means:
    • With the Fossify's Rotate fullscreen media by setting set to "System setting", and the system auto rotation setting set to On, rotate the device from vertical to horizontal (or the other way around if you started out horizontal)
    • With the Fossify's Rotate fullscreen media by setting set to "Device rotation", rotate the device from vertical to horizontal (or the other way around if you started out horizontal)
    • With the Fossify's Rotate fullscreen media by setting set to "Aspect ratio", swipe to switch an image with a different aspect ratio than the one you started out from (if you started out on an image with portrait aspect ratio, you want to get to a landscape one and vice versa)
    • Using the rotation button in the bottom right of the screen
  4. Observe the issue.

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.

@CommanderPirx CommanderPirx added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Jul 30, 2024
@Aga-C Aga-C added the device/software specific Issues that only happen on some devices or with some specific hardware/software label Jul 30, 2024
@Aga-C
Copy link
Member

Aga-C commented Jul 30, 2024

Can you show what settings you have set in sections Fullscreen media, Deep zoomable images and Extended details?

@Aga-C Aga-C added question Further information is requested waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. labels Jul 30, 2024
@CommanderPirx
Copy link
Author

Can you show what settings you have set in sections Fullscreen media, Deep zoomable images and Extended details?

Sure thing, here's a screenshot:
Screenshot_20240730-173423

@github-actions github-actions bot removed the waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. label Jul 30, 2024
@Aga-C Aga-C removed the question Further information is requested label Jul 30, 2024
@RatzzFatzz
Copy link

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.

@Aga-C Aga-C removed the needs triage Issue is not yet ready for PR authors to take up label Oct 13, 2024
@rry-je
Copy link

rry-je commented Oct 17, 2024

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.

@rry-je rry-je linked a pull request Oct 17, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working device/software specific Issues that only happen on some devices or with some specific hardware/software
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants