Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One way to position the image slightly outside the cardView is to use negative margin on the ImageView. For example, if you want to position the image 10dp outside the cardView on the left side, you can add the following attribute to the ImageView in your layout:

<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-10dp" /> 

This will move the ImageView 10dp to the left of its original position, effectively placing it slightly outside the cardView. You can adjust the margin value accordingly to position the image outside the cardView in other directions as well.