-
Notifications
You must be signed in to change notification settings - Fork 167
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
Conversation
Is there any way with this approach to retain the transparency effect? |
Not sure but I'll take a look. Didn't really think about that. |
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 |
# Conflicts: # app/src/main/java/com/jerboa/ui/components/common/Navigation.kt # app/src/main/java/com/jerboa/ui/components/community/CommunityActivity.kt
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
Improved the UX of the screen viewer jRpZ1CZ3Ew.mp4 |
There was a problem hiding this 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.
Great stuff @MV-GH 🔥 |
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:
![studio64_jsS9PPjaqd](https://private-user-images.githubusercontent.com/67873169/251507252-75b4ea23-ceb3-4505-9614-051ba2ad9e45.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1NTQzMTEsIm5iZiI6MTcxOTU1NDAxMSwicGF0aCI6Ii82Nzg3MzE2OS8yNTE1MDcyNTItNzViNGVhMjMtY2ViMy00NTA1LTk2MTQtMDUxYmEyYWQ5ZTQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI4VDA1NTMzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ2ZjA1ZTJlYzEwZTIwMzdhYzQ3OWExZGY1ZWVhYjM1Y2E3YmQxZWYzODliMDBmYTc2NTllZmM1NTBhZmQ2ZGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.dSxK-GEkkM_RCjhVFuz3nl1hlxeJAFGxDfpQOn4xo3k)
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.
Messing with fitsSystemWindows & WindowCompat.setDecorFitsSystemWindows, etc
![studio64_tp90ORfXYT](https://private-user-images.githubusercontent.com/67873169/251507933-144cbeae-3954-476c-bf17-ab38f9f57fe8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1NTQzMTEsIm5iZiI6MTcxOTU1NDAxMSwicGF0aCI6Ii82Nzg3MzE2OS8yNTE1MDc5MzMtMTQ0Y2JlYWUtMzk1NC00NzZjLWJmMTctYWIzOGY5ZjU3ZmU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI4VDA1NTMzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJiZDY2YjI5YWNhMjk5YjZkMjQyODk4MjBlMTVhYTU2NmM4NDA3NDdkNThiZTNmMDJlNmFiYzE4MzlhMTY3MmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.AfN7yTOPfJDTrOE4fqLOIpE8pQSNlGTffUDDSmLHwqU)
you get this result on some android versions
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](https://private-user-images.githubusercontent.com/67873169/251509656-70fc72de-a968-4b62-8b73-94e72782206a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1NTQzMTEsIm5iZiI6MTcxOTU1NDAxMSwicGF0aCI6Ii82Nzg3MzE2OS8yNTE1MDk2NTYtNzBmYzcyZGUtYTk2OC00YjYyLThiNzMtOTRlNzI3ODIyMDZhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI4VDA1NTMzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwZmE1MjIwOTNiNGMwZWUyMDBjMWRkZGZjMmQ1NjA0MzUwMmFiMzJlOTU3ZWVjYjEyNTczMTA0MzE1MDNhNzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.9k2Dnx5RP60a9yMh8CERLW29YFZKr6PsQ-CnDFx7Sqg)
It retains all existing functionality.
Fixes #966