Created
June 19, 2020 12:31
-
-
Save erfanegtfi/24e97a0e430d41b7a91252b775095fc8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float radius = context.getResources().getDimension(R.dimen.border_radius_hug); | |
shapeAppearanceModel = new ShapeAppearanceModel() | |
.toBuilder() | |
.setAllCorners(CornerFamily.ROUNDED,radius) | |
.build(); | |
imageView.setShapeAppearanceModel(shapeAppearanceModel) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<com.google.android.material.imageview.ShapeableImageView | |
android:id="@+id/thumb" | |
android:layout_width="80dp" | |
android:layout_height="60dp" | |
app:shapeAppearanceOverlay="@style/circleImageView" | |
/> | |
<style name="circleImageView" parent=""> | |
<item name="cornerFamily">rounded</item> | |
<item name="cornerSize">10%</item> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment