지금 라이브 중 - 라이브 아이템 유/무료 표시 방식 수정

- 무료 배경색 : #111111
- 유료 배경색 : #DD4500
- 유료 표시 - white 캔과 함께 100 과 같이 가격으로 변경
This commit is contained in:
klaus 2024-03-14 16:50:57 +09:00
parent 39e49b08d9
commit 012d1d94d5
5 changed files with 27 additions and 10 deletions

View File

@ -36,11 +36,18 @@ class LiveNowAdapter(
}
if (item.price > 0) {
binding.tvPrice.text = "유료"
binding.tvPrice.setBackgroundResource(R.drawable.bg_round_corner_10_881609)
binding.tvPrice.text = "${item.price}"
binding.tvPrice.setCompoundDrawablesWithIntrinsicBounds(
R.drawable.ic_can_white,
0,
0,
0
)
binding.tvPrice.setBackgroundResource(R.drawable.bg_round_corner_13_3_dd4500)
} else {
binding.tvPrice.text = "무료"
binding.tvPrice.setBackgroundResource(R.drawable.bg_round_corner_10_3bb9f1)
binding.tvPrice.setCompoundDrawables(null, null, null, null)
binding.tvPrice.setBackgroundResource(R.drawable.bg_round_corner_13_3_111111)
}
if (item.tags.isNotEmpty()) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_881609" />
<corners android:radius="10dp" />
<solid android:color="@color/color_111111" />
<corners android:radius="13.3dp" />
<stroke
android:width="1dp"
android:color="@color/color_881609" />
android:color="@color/color_111111" />
</shape>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_dd4500" />
<corners android:radius="13.3dp" />
<stroke
android:width="1dp"
android:color="@color/color_dd4500" />
</shape>

View File

@ -30,14 +30,16 @@
android:layout_height="wrap_content"
android:layout_marginStart="3.3dp"
android:layout_marginTop="3.3dp"
android:drawablePadding="1dp"
android:fontFamily="@font/gmarket_sans_medium"
android:paddingHorizontal="7.3dp"
android:paddingVertical="4dp"
android:textColor="@color/white"
android:textSize="12sp"
android:textSize="10sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:background="@drawable/bg_round_corner_10_881609"
tools:background="@drawable/bg_round_corner_13_3_111111"
tools:ignore="SmallSp"
tools:text="유료" />
<ImageView
@ -48,7 +50,7 @@
android:layout_marginEnd="3.3dp"
android:contentDescription="@null"
android:src="@drawable/ic_lock"
android:visibility="gone"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -106,8 +108,8 @@
android:id="@+id/tv_nickname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/gmarket_sans_medium"
android:layout_marginStart="5.3dp"
android:fontFamily="@font/gmarket_sans_medium"
android:gravity="center_vertical"
android:textColor="@color/color_777777"
android:textSize="10sp"