androidresizescalefresco

SimpleDraweeView scale proportionally


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.


Solution

  • 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