How to avoid stretch CardView due to the ImageView?

When adding an ImageView, weird increases CardView. After removing everything comes back to normal
5a91caa41ab3d060384967.png
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.cardview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/cvOrderItem" android:layout_width="parent" android:layout_height="wrap content" android:layout_marginend="0dp" android:layout_marginstart="0dp" android:layout_margintop="1dp">

 <android.support.constraint.constraintlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="parent" android:layout_height="wrap content">

<!-- there are different controls -->
 <imageview android:id="@+id/ivCustomer" android:layout_width="24dp" android:layout_height="24dp" android:layout_marginstart="8dp" android:layout_margintop="8dp" app:layout_constraintstart_tostartof="parent" app:layout_constrainttop_tobottomof="@+id/tvUnLoad" card_view:srccompat="@drawable/ic_people_blue_900_24dp">


</imageview></android.support.constraint.constraintlayout>
</android.support.v7.widget.cardview>


after removal
5a91cae0347e8551000932.png
June 7th 19 at 15:41
0 answer

Find more questions by tags Android