I have a fixed size CardView
, and I need to fill it with an ImageView
, this is how the code looks so far:
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card1x"
android:layout_width="160dp"
android:layout_height="170dp">
<ImageView
android:id="@+id/futourImage"
android:src="@drawable/futourfie"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
And in order to fit it, tried :
ImageView futour = (ImageView)findViewById(R.id.futourImage);
futour.setScaleType(ImageView.ScaleType.FIT_XY);
But doesn't seems to solve the problem, looking for an effective solution! Thanks