Strange issue in using placeholderImage in xml on SimpleDraweeView
See original GitHub issueI am using this code in my xml:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/image"
android:layout_width="96dp"
android:layout_height="96dp"
android:padding="16dp"
fresco:placeholderImage="@drawable/_emergency_contact"
fresco:roundAsCircle="true" />
Drawable _emergency_contact.png: http://i.imgur.com/8tzBJF6.png
Rendered image: http://i.imgur.com/yLrpWlQ.png
Some lines are coming on the sides of the image. Looks like some bug.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:4
- Comments:9 (6 by maintainers)
Top Results From Across the Web
I have problems with circle image in Fresco - Stack Overflow
I have problem with round image, not works, Fresco download the image and display but not transform in a circle. I don't know...
Read more >Placeholder, failure and retry images - Fresco
The placeholder image is displayed from before you've set a URI or a controller until it has finished loading (successfully or not). XML....
Read more >android - SimpleDraweeView rounded inside scrollview - Stack ...
I'm trying to migrate from UIL to Facebook's Fresco lib. So far everything looks fine but when I put a rounded image inside...
Read more >Loading images and caching them with Fresco in Android
There is no problem to load and show these data, the problem was in the ... Then a strange bug occured : the...
Read more >Simpledraweeview Not Resizing After Scaling Image In Fresco
I like fresco but i have an issue with simpledraweeview which doesn't resize to ... android:layoutheight130dp fresco:placeholderImage@drawable/mydrawable.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I know this is strange but this is working as intended.
This is mentioned in the documentation at rounding: http://frescolib.org/docs/rounded-corners-and-circles.html
This is what “edges are repeated” means. If the view is bigger than the placeholder image the edges will repeat. We couldn’t find a better way to solve this (the other solution is to repeat the whole image) and we should publish a blog post about how rounding works. If anyone has a better idea we’re open to it 😃
There are two workarounds that you can do:
Or you can just add 1px transparent border to your image and then transparent pixels are going to be repeated (i.e. it will look correct). And I mean the image file (png) has to be saved with this transparent 1px border.