When setting fresco:roundAsCircle="true", fresco:placeholderImageScaleType="centerCrop" is ignored. I should see the placeholder image with it's X and Y filling the space. However, it instead displays a small version in the upper left corner.
Set fresco:placeholderImageScaleType="centerCrop"
Set fresco:roundAsCircle="true"
Hi @nbortolussi
The option to round the image has some limitations for images which are smaller than the view it's being drawn in, see the documentation: https://frescolib.org/docs/rounded-corners-and-circles.html
Do you still experience the same issue if the placeholder image is larger?
Hi @erikandre unfortunately I am experiencing the same results even with the placeholder image much larger than the view. Am I missing something?
OK, that's unexpected. Could you attach a screenshot of how this looks?
The image width and height are bigger than view width and height. Camera icon is directly in the center.
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/add_image_button"
android:layout_width="150dp"
fresco:placeholderImage="@drawable/bg_camera"
android:layout_height="150dp"
fresco:actualImageScaleType="centerCrop"
fresco:roundAsCircle="true"
fresco:placeholderImageScaleType="centerCrop"
android:layout_centerInParent="true"/>


Is the placeholder a PNG file?
This is likely a duplicate of #2260. Looks like Android changed the way that resources are handled if a density bucket is missing. Do you supply all densities or put the resource in /drawable/ instead of drawable-xhdpi or similar?
correct I only have one version of the PNG. it resides in /drawable-xhdpi/. for most icons I am supplying all densities, but am not for some such as this that are being used as placeholders or background images etc. in fresco views. will try placing it in /drawable
confirmed that when placing the PNG in a non density specific folder like drawable or drawable-nodpi the problem is resolved. thank you for the help.
confirmed that when placing the PNG in a non density specific folder like drawable or drawable-nodpi the problem is resolved. thank you for the help.
I can only put one png in drawable-nodpi.But how to select the png size that display normal in different screen density mobile phone.
Most helpful comment
confirmed that when placing the PNG in a non density specific folder like drawable or drawable-nodpi the problem is resolved. thank you for the help.