Skip to content

Instantly share code, notes, and snippets.

@quanmltya
quanmltya / README.MD
Created Oct 28, 2020 — forked from gabrielemariotti/README.MD
How to use the ShapeableImageView.
View README.MD

The Material Components Library introduced with the 1.2.0-alpha03 the new ShapeableImageView.

In your layout you can use:

 <com.google.android.material.imageview.ShapeableImageView
      android:id="@+id/image_view"
      app:srcCompat="@drawable/..." />

Then in your code apply the ShapeAppearanceModel to define your custom corners: