fresco icon indicating copy to clipboard operation
fresco copied to clipboard

roundAsCircle does not apply to placeholder images

Open REWKyleB opened this issue 11 years ago • 4 comments

<com.facebook.drawee.view.SimpleDraweeView
    android:id="@+id/agent_image"
    android:layout_width="80dp"
    android:layout_height="80dp"
    fresco:roundAsCircle="true"
    fresco:placeholderImage="@drawable/ic_image_placeholder"
    fresco:placeholderImageScaleType="fitCenter"/>

roundAsCircle is being applied to the replacement images, but not the placeholder.

Thanks!

REWKyleB avatar Apr 02 '15 22:04 REWKyleB

What is ic_image_placeholder (what kind of drawable)?

plamenko avatar Apr 03 '15 01:04 plamenko

It's just a normal bitmap (.png).

REWKyleB avatar Apr 03 '15 23:04 REWKyleB

Hmm, that's weird. If the placeholder gets resolved to ColorDrawable or BitmapDrawable, then it should get rounded. Can you give us more information? Btw, are you able to debug? This is the place where rounding should be applied: https://github.com/facebook/fresco/blob/53e1317d47e0e33d9927740ad4974cc479d8cc2a/drawee/src/main/java/com/facebook/drawee/generic/GenericDraweeHierarchy.java#L165

plamenko avatar Apr 04 '15 19:04 plamenko

Android studio add a bit of padding to the image when I initially import it and I didn't notice. It was correctly rounding the image, but the extra space would make it seem like it was rounding. All working fine :)

REWKyleB avatar Apr 06 '15 17:04 REWKyleB