feat:房间背景item圆角展示

This commit is contained in:
max
2024-05-22 14:23:35 +08:00
parent 6b6e72ff25
commit 4903a3f9a8
2 changed files with 8 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<ImageView <com.google.android.material.imageview.ShapeableImageView
android:id="@+id/iv_image" android:id="@+id/iv_image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
@@ -14,7 +14,8 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/default_cover" android:src="@drawable/default_cover"
app:layout_constraintDimensionRatio="166:206" app:layout_constraintDimensionRatio="166:206"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent"
app:shapeAppearance="@style/shape_corner_5dp" />
<TextView <TextView
android:id="@+id/tv_status" android:id="@+id/tv_status"

View File

@@ -605,6 +605,11 @@
<item name="cornerSize">50%</item> <item name="cornerSize">50%</item>
</style> </style>
<style name="shape_corner_5dp">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">@dimen/dp_5</item>
</style>
<style name="shape_corner_6dp"> <style name="shape_corner_6dp">
<item name="cornerFamily">rounded</item> <item name="cornerFamily">rounded</item>
<item name="cornerSize">@dimen/dp_6</item> <item name="cornerSize">@dimen/dp_6</item>