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

Fix sharp corners on placeholders #7142

Merged

Conversation

flofriday
Copy link
Contributor

@flofriday flofriday commented Apr 26, 2024

Description

All placeholder now have round corners matching the corner radius of the image that will eventually load.

I also added placeholder to the avatars on the contributor screen.

Screenshots (now/earlier):
image

Checklist

Notes

I am quite interested in hearing some feedback about my code here. Like, I know that the GradientDrawable I used here seems somewhat questionable since we don't need a gradient. However, I couldn't get ColorDrawable to round the cornors and the ShapeDrawable and PaintDrawable were always transparent :/

Also another question, I initially used quite a few type inference assignments with var x = new SomeClass(). However, after double checking I discovered that the rest of the codebase isn't written in that style so I removed them again. So I wanted to ask again if there is a special reason why they aren't used and would you be against introducing them?

flofriday and others added 2 commits April 27, 2024 00:41
All placeholder now have round corners matching the corner radius of the
image that will eventually load.

I also added placeholder to the avatars on the contributor screen.
@ByteHamster
Copy link
Member

Thanks! Will be released in 3.5.x

I know that the GradientDrawable I used here seems somewhat questionable since we don't need a gradient. However, I couldn't get ColorDrawable to round the cornors and the ShapeDrawable and PaintDrawable were always transparent :/

I don't know. In my quick experiment with ShapeDrawable, they were transparent as well.

I initially used quite a few type inference assignments with var x = new SomeClass(). However, after double checking I discovered that the rest of the codebase isn't written in that style so I removed them again. So I wanted to ask again if there is a special reason why they aren't used and would you be against introducing them?

I think because it is a Java 10 feature, it might not be supported on Android. In any case, personally, I find it easier to review code when I can see the types of things. Especially when reading the code on GitHub (or any other diff tool) where there is no IDE to annotate the types. Maybe relying so much on the types and not using the new automatic stuff makes me a bit old-fashioned :D Maybe that's also because at work I sometimes work on c++ projects that use so many templates that the IDE cannot figure out what type everything has -- then I have no auto-completion when someone uses auto instead of specifying the type explicitly.

@ByteHamster ByteHamster merged commit c063c59 into AntennaPod:develop Apr 27, 2024
6 checks passed
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.

None yet

2 participants