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

Add separate screen for ImageViewer #980

Merged
merged 11 commits into from
Jul 11, 2023
Merged

Add separate screen for ImageViewer #980

merged 11 commits into from
Jul 11, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Jul 6, 2023

All though #966 could simply be fixed by doing statusBarsPadding() for android 13. I wanted to fix the the different levels of positioning of the buttons across the supported android versions.

I have attempted many things to get it work for a dialog. But i could never get it to work for all Android versions.

Examples:
Existing behaviour on older than android 13. The dialog overlaps half the status bar. Only doesn't overlap the buttons due to the padding on the buttons. Possibly will overlap on phones with bigger status bar due to a bigger notch.
studio64_jsS9PPjaqd

Messing with fitsSystemWindows & WindowCompat.setDecorFitsSystemWindows, etc
you get this result on some android versions
studio64_tp90ORfXYT

After wasting several hours on this, it is in my opinion you should never bother with fullscreen dialogs. Instead I turned it into a screen/activity. And now it not only consistent with positioning across all android versions. It is placed exactly where other back buttons would be placed.

How it looks now
studio64_eMGN9EIJ26

It retains all existing functionality.

Fixes #966

@twizmwazin
Copy link
Contributor

Is there any way with this approach to retain the transparency effect?

@MV-GH
Copy link
Collaborator Author

MV-GH commented Jul 7, 2023

Not sure but I'll take a look. Didn't really think about that.

@MV-GH
Copy link
Collaborator Author

MV-GH commented Jul 8, 2023

I did not find a way to do this yet. But I took a look at the other apps and none allow you to see through them. So instead I can make it always completely black

MV-GH added 4 commits July 8, 2023 20:03
# Conflicts:
#	app/src/main/java/com/jerboa/ui/components/common/Navigation.kt
#	app/src/main/java/com/jerboa/ui/components/community/CommunityActivity.kt
@MV-GH MV-GH marked this pull request as draft July 10, 2023 14:12
@dessalines
Copy link
Member

I'd be fine with a black background also. Whatever is easier to maintain and less buggy.

# Conflicts:
#	app/src/main/java/com/jerboa/MainActivity.kt
#	app/src/main/java/com/jerboa/ui/components/home/BottomNavActivity.kt
#	app/src/main/java/com/jerboa/ui/components/home/HomeActivity.kt
#	app/src/main/java/com/jerboa/ui/components/person/PersonProfileActivity.kt
#	app/src/main/java/com/jerboa/ui/components/post/PostListing.kt
@MV-GH MV-GH marked this pull request as ready for review July 11, 2023 11:08
@MV-GH
Copy link
Collaborator Author

MV-GH commented Jul 11, 2023

Improved the UX of the screen viewer

jRpZ1CZ3Ew.mp4

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested and it works great.

@dessalines dessalines merged commit f11d046 into LemmyNet:main Jul 11, 2023
1 check passed
@MV-GH MV-GH deleted the bug/966 branch July 11, 2023 13:07
@lawrence0arabia
Copy link

Great stuff @MV-GH 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Back and download buttons difficult to click due to status bar overlapping them (when viewing images)
4 participants