0

[![enter image description here][1]][1]This is my SimpleDraeeViwe after image load image is not loading as full, means its covering full width of image view but image getting cut on left and right side. Also tried with 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" />
Lovekush Vishwakarma
  • 3,035
  • 23
  • 25

3 Answers3

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"
                     />
Santosh Bachkar
  • 460
  • 4
  • 14
0

You have to set the correct scale type, in your case 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" />

See also http://frescolib.org/docs/scaling.html

Alexander Oprisnik
  • 1,212
  • 9
  • 9
0

try to set this Programmatically, it's working

simpleDraweeView.getHierarchy().setActualImageScaleType(ScalingUtils.ScaleType.FIT_CENTER);
Shyam Kumar
  • 909
  • 11
  • 12