[![在此处输入图像说明] [1]] [1]这是我的SimpleDraeeViwe,图像加载图像未加载为已满,表示其覆盖图像视图的全宽,但图像在左侧和右侧切割。 还试用了android:adjustViewBounds = true
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/image_mint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="100dp"
fresco:actualImageScaleType="fitCenter"
fresco:viewAspectRatio="1.33"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
答案 0 :(得分:0)
try this
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/image_mint"
android:layout_width="match_parent"
android:layout_height="match_parent"
fresco:actualImageScaleType="fitCenter"
/>
答案 1 :(得分:0)
您需要设置正确的比例类型,例如centerCrop
:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/image_mint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="100dp"
fresco:actualImageScaleType="centerCrop"
fresco:viewAspectRatio="1.33"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
答案 2 :(得分:0)
尝试以编程方式进行设置,它正在工作
simpleDraweeView.getHierarchy().setActualImageScaleType(ScalingUtils.ScaleType.FIT_CENTER);