0

I wan't to insert in my SimpleDraweeView with

 android:layout_width="50dp"
 android:layout_height=50dp

some picture, that may be bigger than this dimensions. I want to resize picture proportionally, so for example picture with source dimension 117x81 should show like 50x34. What should I do to that the picture is not circumcised, but decreased proportionally.

Dima Stoyanov
  • 121
  • 1
  • 11

2 Answers2

1

You should set actualImageScaleType in you xml and choose centerInside option. Do not use android:scaleType since it does not have effect on Drawee.

Please take a look at other available options as well. enter image description here

Reference link: Fresco Drawee Scaling

bajicdusko
  • 1,630
  • 1
  • 17
  • 32
1

You can doing that with is code:

simpleDraweeView.getHierarchy().setActualImageScaleType(ScalingUtils.ScaleType.CENTER_CROP);