use rounded corners imageview instead of rounding it ourselves

This commit is contained in:
tibbi 2022-03-07 10:46:31 +01:00
parent 9052c5183d
commit 5e97a97e5f
3 changed files with 13 additions and 7 deletions

View file

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.imageview.ShapeableImageView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/attachment_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:paddingBottom="@dimen/medium_margin" />
android:paddingBottom="@dimen/medium_margin"
app:shapeAppearanceOverlay="@style/roundedImageView" />

View file

@ -2,4 +2,8 @@
<style name="AppTheme" parent="AppTheme.Base" />
<style name="roundedImageView" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">@dimen/normal_margin</item>
</style>
</resources>