After using the roundedCornerRadius property, setFailureImage ScaleType does not work properly
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/pic_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
fresco:viewAspectRatio="1.77"
fresco:roundedCornerRadius="@dimen/spa_3"/>
/**
* 设置通用样式
*
* @param view SimpleDraweeView
* @param load_drawable 加载动画
* @param place_holder 默认图
*/
private static void initImageHierarchy(SimpleDraweeView view, Drawable load_drawable, int place_holder) {
GenericDraweeHierarchy hierarchy = view.getHierarchy();
hierarchy.setFadeDuration(500);
hierarchy.setProgressBarImage(load_drawable);
hierarchy.setFailureImage(R.mipmap.place_holder, ScalingUtils.ScaleType.CENTER_INSIDE);
if (place_holder != 0) {
hierarchy.setPlaceholderImage(place_holder, ScalingUtils.ScaleType.CENTER_INSIDE);
}
hierarchy.setActualImageScaleType(ScalingUtils.ScaleType.FIT_XY);
}
@oprisnik- is this the expected behavior?
I want to set the FailureImage and want the ScaleType to be centered, but once I set the rounded roundedCornerRadius. Can't be centered
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug" or "enhancement" and I will leave it open. Thank you for your contributions.
unsolved
Please set a failure image scale type. That should fix your issues.