Use ShapeableImageView for rounded thumbnails instead of Coil transformations

This commit is contained in:
arkon
2021-08-31 22:35:52 -04:00
parent 59aef13200
commit 0e26abf7a6
11 changed files with 21 additions and 38 deletions

View File

@@ -12,7 +12,7 @@
android:background="?attr/selectableItemBackground"
android:orientation="horizontal">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/cover"
android:layout_width="0dp"
android:layout_height="match_parent"
@@ -22,6 +22,7 @@
app:layout_constraintDimensionRatio="h,3:2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearance="@style/ShapeAppearanceOverlay.Cover"
tools:src="@mipmap/ic_launcher" />
<LinearLayout

View File

@@ -8,7 +8,7 @@
android:background="@drawable/list_item_selector_background"
android:paddingHorizontal="8dp">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/thumbnail"
android:layout_width="56dp"
android:layout_height="56dp"
@@ -18,6 +18,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearance="@style/ShapeAppearanceOverlay.Cover"
tools:src="@mipmap/ic_launcher" />
<TextView

View File

@@ -16,7 +16,7 @@
android:layout_marginBottom="12dp"
android:orientation="horizontal">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/track_search_cover"
android:layout_width="68dp"
android:layout_height="95dp"
@@ -26,6 +26,7 @@
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearance="@style/ShapeAppearanceOverlay.Cover"
tools:src="@mipmap/ic_launcher" />
<TextView

View File

@@ -5,13 +5,13 @@
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@drawable/list_item_selector_background"
android:paddingStart="12dp"
android:paddingEnd="4dp">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/manga_cover"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:scaleType="centerCrop"
@@ -19,6 +19,7 @@
app:layout_constraintDimensionRatio="h,1:1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearance="@style/ShapeAppearanceOverlay.Cover"
tools:src="@mipmap/ic_launcher" />
<TextView