How to make Squirle ImageView from Android
1 answer
https://github.com/MicroRJ/Android_Superellipse_Library
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.MicroRJ:Android-Canvas-Squircle:1.0'
}
<com.microdevrj.superellipse.custom_superellipse_views.SuperEllipseImageView
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:padding="64dp"
app:colorFill="@color/colorFill"
app:colorStroke="@color/colorStroke"
app:paintStyle="fillAndStroke"
app:strokeWidth="6dp" />
Feel free to look at the open source files to see how it works.
0
source to share