I'd like to preserve the aspect ratio of an imageView and resize it to fill / fit as large as possible without distorting/changing it's aspect ratio using Picasso.
Thus far I've found this:
which suggests using:
.fit().centerInside()
however when I tried it:
Picasso.with(this).load(boxart)
.fit().centerInside()
.into(imageItem);
Along with my XML:
<RelativeLayout
android:id="@+id/rl_ListView1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_centerInParent="true"
android:layout_gravity="left"
android:layout_weight="0.3" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:scaleType="fitXY"
android:layout_gravity="left" />
</RelativeLayout>
However the image still appears distorted (it appears too long and skinny - it's original aspect ratio is distorted) and I am unsure why.