fix(home): On Air 라이브 아이템 UI를 보완한다
This commit is contained in:
@@ -8,7 +8,6 @@ import android.widget.TextView
|
|||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kr.co.vividnext.sodalive.R
|
import kr.co.vividnext.sodalive.R
|
||||||
import kr.co.vividnext.sodalive.common.formatUtcRelativeTimeText
|
import kr.co.vividnext.sodalive.common.formatUtcRelativeTimeText
|
||||||
import kr.co.vividnext.sodalive.extensions.loadUrl
|
|
||||||
import kr.co.vividnext.sodalive.v2.main.home.model.HomeFollowingLiveUiItem
|
import kr.co.vividnext.sodalive.v2.main.home.model.HomeFollowingLiveUiItem
|
||||||
|
|
||||||
class HomeFollowingLiveAdapter(
|
class HomeFollowingLiveAdapter(
|
||||||
@@ -37,14 +36,12 @@ class HomeFollowingLiveAdapter(
|
|||||||
itemView: View,
|
itemView: View,
|
||||||
private val onClickItem: (HomeFollowingLiveUiItem) -> Unit
|
private val onClickItem: (HomeFollowingLiveUiItem) -> Unit
|
||||||
) : RecyclerView.ViewHolder(itemView) {
|
) : RecyclerView.ViewHolder(itemView) {
|
||||||
private val thumbnailImage = itemView.findViewById<ImageView>(R.id.iv_home_following_live_thumbnail)
|
|
||||||
private val profileImage = itemView.findViewById<ImageView>(R.id.iv_home_following_live_creator_profile)
|
private val profileImage = itemView.findViewById<ImageView>(R.id.iv_home_following_live_creator_profile)
|
||||||
private val titleText = itemView.findViewById<TextView>(R.id.tv_home_following_live_title)
|
private val titleText = itemView.findViewById<TextView>(R.id.tv_home_following_live_title)
|
||||||
private val nicknameText = itemView.findViewById<TextView>(R.id.tv_home_following_live_creator_nickname)
|
private val nicknameText = itemView.findViewById<TextView>(R.id.tv_home_following_live_creator_nickname)
|
||||||
private val startedAtText = itemView.findViewById<TextView>(R.id.tv_home_following_live_started_at)
|
private val startedAtText = itemView.findViewById<TextView>(R.id.tv_home_following_live_started_at)
|
||||||
|
|
||||||
fun bind(item: HomeFollowingLiveUiItem) {
|
fun bind(item: HomeFollowingLiveUiItem) {
|
||||||
thumbnailImage.loadUrl(item.creatorProfileImageUrl)
|
|
||||||
profileImage.loadHomeCreatorProfileImage(item.creatorProfileImageUrl)
|
profileImage.loadHomeCreatorProfileImage(item.creatorProfileImageUrl)
|
||||||
titleText.text = item.title
|
titleText.text = item.title
|
||||||
nicknameText.text = item.creatorNickname
|
nicknameText.text = item.creatorNickname
|
||||||
|
|||||||
@@ -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/gray_900" />
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="@color/color_3bb9f1" />
|
||||||
|
<corners android:radius="90dp" />
|
||||||
|
</shape>
|
||||||
@@ -1,38 +1,48 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="244dp"
|
android:layout_width="263dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="100dp"
|
||||||
android:background="@drawable/bg_feed_card"
|
android:background="@drawable/bg_home_following_live_capsule"
|
||||||
android:orientation="vertical"
|
android:paddingStart="12dp"
|
||||||
android:padding="@dimen/spacing_14">
|
android:paddingEnd="22dp">
|
||||||
|
|
||||||
<FrameLayout
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/iv_home_following_live_creator_profile"
|
||||||
android:layout_height="120dp"
|
android:layout_width="75dp"
|
||||||
android:background="@drawable/bg_audio_content_card_thumbnail">
|
android:layout_height="75dp"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:src="@drawable/ic_placeholder_profile" />
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/iv_home_following_live_thumbnail"
|
android:id="@+id/layout_home_following_live_status"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@null"
|
android:layout_marginStart="@dimen/spacing_8"
|
||||||
android:scaleType="centerCrop"
|
android:gravity="center_vertical"
|
||||||
tools:src="@drawable/ic_launcher_background" />
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_home_following_live_creator_profile"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_home_following_live_creator_profile"
|
||||||
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="18dp"
|
android:layout_height="18dp"
|
||||||
android:layout_gravity="top|start"
|
|
||||||
android:layout_margin="@dimen/spacing_8"
|
|
||||||
android:background="@drawable/bg_live_thumbnail_badge_capsule"
|
android:background="@drawable/bg_live_thumbnail_badge_capsule"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="@dimen/spacing_4">
|
android:paddingHorizontal="@dimen/spacing_4"
|
||||||
|
android:paddingVertical="2dp">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="@dimen/spacing_8"
|
android:layout_width="8dp"
|
||||||
android:layout_height="@dimen/spacing_8"
|
android:layout_height="8dp"
|
||||||
android:background="@drawable/bg_live_thumbnail_dot" />
|
android:background="@drawable/bg_live_thumbnail_dot" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -40,53 +50,11 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/spacing_4"
|
android:layout_marginStart="@dimen/spacing_4"
|
||||||
android:includeFontPadding="true"
|
android:includeFontPadding="false"
|
||||||
android:text="LIVE"
|
android:text="LIVE"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
tools:ignore="HardcodedText,SmallSp" />
|
tools:ignore="HardcodedText" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_home_following_live_title"
|
|
||||||
style="@style/Typography.Heading4"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/spacing_12"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:includeFontPadding="false"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
tools:text="라이브 제목" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/spacing_8"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_home_following_live_creator_profile"
|
|
||||||
android:layout_width="28dp"
|
|
||||||
android:layout_height="28dp"
|
|
||||||
android:background="@drawable/bg_round_corner_999_263238"
|
|
||||||
android:contentDescription="@null"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
tools:src="@drawable/ic_placeholder_profile" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_home_following_live_creator_nickname"
|
|
||||||
style="@style/Typography.Body6"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/spacing_8"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:includeFontPadding="false"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="@color/gray_300"
|
|
||||||
tools:text="크리에이터 이름" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_home_following_live_started_at"
|
android:id="@+id/tv_home_following_live_started_at"
|
||||||
@@ -96,6 +64,36 @@
|
|||||||
android:layout_marginStart="@dimen/spacing_8"
|
android:layout_marginStart="@dimen/spacing_8"
|
||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:textColor="@color/gray_500"
|
android:textColor="@color/gray_500"
|
||||||
tools:text="2분 전" />
|
tools:text="00:00" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_home_following_live_title"
|
||||||
|
style="@style/Typography.Heading4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_4"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/layout_home_following_live_status"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/layout_home_following_live_status"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_home_following_live_status"
|
||||||
|
tools:text="라이브 제목" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_home_following_live_creator_nickname"
|
||||||
|
style="@style/Typography.Body6"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_4"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@color/gray_500"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_home_following_live_title"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_home_following_live_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_home_following_live_title"
|
||||||
|
tools:text="크리에이터이름" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user