Skip to content

Instantly share code, notes, and snippets.

@rajohns08
Created April 28, 2016 13:04
Show Gist options
  • Save rajohns08/bdc72ada3c2d26d1c16bc56d44194a6d to your computer and use it in GitHub Desktop.
Save rajohns08/bdc72ada3c2d26d1c16bc56d44194a6d to your computer and use it in GitHub Desktop.
Android - Add border to ImageView that is center cropped
<ImageView
android:padding="2dp"
android:layout_width="110dp"
android:layout_height="110dp"
android:src="@drawable/dummy_pic"
android:scaleType="centerCrop"
android:cropToPadding="true"
android:background="@color/white" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment