Checkerboard background for transparency in zoomed images #92
No reviewers
Labels
No Label
Difficulty - Beginner friendly
Difficulty = Easy
Difficulty = Hard
Difficulty = Medium
Priority = CRITICAL
Priority = High
Priority = Low
Priority = Normal
Priority = Some day
Status - Fixed somewhere else
Status - No details provided
Status = Can't fix
Status = Duplicate
Status = Help wanted
Status = Invalid
Status = Need more details
Status = Taken
Status = Wontfix
Type - Selfoss works like this
Type = Bug
Type = Chore
Type = Enhancement
Type = Feature
Type = Question
Type = SELFOSS API ISSUE
Type = Tools
Type = UX/Design
Up For Grabs
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Louvorg/ReaderForSelfoss-multiplatform#92
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "davidoskky/ReaderForSelfoss-multiplatform:checkerboard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Types of changes
This closes issue #12
A checkerboard background is added to each image in the image view, so that when you load an image with a transparent background it's easier to visualize.
I may add this to images in the articles and feed icons as well if that is appreciated.
It's weird to have the checkboard background only on the image.
When I was testing, I saw this and thought it didn't work.
It would be better to have the checkboard as a background for the whole activity.
That's actually quite easy to achieve. I did it this way because I felt it was unesthetic to have the whole screen checkered when that was unnecessary.
I hope this feature will be useful only rarely and thus I would prefer the checkerboard to appear sparingly to users without distracting when that's not necessary.
Moreover, this can be applied to the images within the articles as well and to the sources icons while setting the whole screen to a checkerboard can only be used in this screen.
If you prefer, I can set the whole screen to a checkerboard; but I feel this provides a cleaner interface which is also easier to the eye.
In general the user shouldn't be testing if a particular feature works all the time, it should just work when it's needed.
Do you have a screenshot of the result with the whole screen checkered ? Because the screenshot I posted are unesthetic too.
Is there anything preventing us from doing both ?
I don't think that the white and checkered background is easy on the eye either.
So, is there a way to test if the image have a light background (in light mode) or a dark background (in dark mode) ? That way, we would only change the background when needed.
Here is a screenshot with the full screen.
No, not really.
The background was previously black, maybe that would be better.
I think doing something like that would be quite difficult. I have found no libraries doing that and maintaining such feature would become a huge hassle since I can imagine a lot of problems and hedge cases arising.
I the screenshot whith the whole screen checkered, the checkboard is smaller than the other screenshots, and the image is very low quality, so I don't find this version better than the other.
I just tested a little bit, and found that setting
android:background="?attr/colorOnBackground"
to thePhotoview
works pretty well.(In light mode)
(In dark mode)
You mean to set the background color? Yes, I have to insert that in so that the color changes according to the theme.
Here is a screenshot with the fullscreen background and the same image as the first one.
The advantage seems to be that the background does not change when you zoom in, while it gets zoomed does when you set it as the image background.
This should always be the case.
In all the screenshots here, the ones I prefer the most are the one in my previous comment.
ae0909ef0a
toc09a32e9ad
I added the background and this now produces views such as the ones you sent in your screenshots.
The main problem with this implementation is that the checkerboard background is static and gets zoomed in when you zoom in; thus the squares become larger when you zoom in.
I found no way to keep the checkered background just behind the image without it being zoomed with the image.
I can alternatively set the checkerboard to cover the whole background; this will also appear with images without any transparency.
Here is my proposition.
Looks good to me; you may merge this.