feat: 메인 라이브
- 최근 종료한 라이브, 라이브 다시 듣기, 라이브 예약 아이템 사이즈 조절
This commit is contained in:
@@ -221,7 +221,7 @@ class LiveFragment : BaseFragment<FragmentLiveBinding>(FragmentLiveBinding::infl
|
|||||||
.pager
|
.pager
|
||||||
.layoutParams as LinearLayout.LayoutParams
|
.layoutParams as LinearLayout.LayoutParams
|
||||||
|
|
||||||
val pagerWidth = screenWidth.toDouble() - 26.7f.dpToPx()
|
val pagerWidth = screenWidth.toDouble()
|
||||||
val pagerHeight = (pagerWidth * 0.53).roundToInt()
|
val pagerHeight = (pagerWidth * 0.53).roundToInt()
|
||||||
layoutParams.width = pagerWidth.roundToInt()
|
layoutParams.width = pagerWidth.roundToInt()
|
||||||
layoutParams.height = pagerHeight
|
layoutParams.height = pagerHeight
|
||||||
@@ -388,7 +388,7 @@ class LiveFragment : BaseFragment<FragmentLiveBinding>(FragmentLiveBinding::infl
|
|||||||
outRect.right = 8f.dpToPx().toInt()
|
outRect.right = 8f.dpToPx().toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
liveRecommendChannelAdapter.itemCount - 1 -> {
|
adapter.itemCount - 1 -> {
|
||||||
outRect.left = 8f.dpToPx().toInt()
|
outRect.left = 8f.dpToPx().toInt()
|
||||||
outRect.right = 0
|
outRect.right = 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,12 @@ class LiveNowAdapter(
|
|||||||
binding.tvTitle.text = item.title
|
binding.tvTitle.text = item.title
|
||||||
binding.tvNickname.text = item.creatorNickname
|
binding.tvNickname.text = item.creatorNickname
|
||||||
|
|
||||||
|
binding.ivLock.visibility = if (item.isPrivateRoom) {
|
||||||
|
View.VISIBLE
|
||||||
|
} else {
|
||||||
|
View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
if (item.price > 0) {
|
if (item.price > 0) {
|
||||||
binding.llCan.visibility = View.VISIBLE
|
binding.llCan.visibility = View.VISIBLE
|
||||||
binding.tvCan.text = item.price.moneyFormat()
|
binding.tvCan.text = item.price.moneyFormat()
|
||||||
|
|||||||
@@ -115,6 +115,12 @@ class LiveReservationAdapter(
|
|||||||
binding.tvCan.text = item.price.moneyFormat()
|
binding.tvCan.text = item.price.moneyFormat()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.ivLock.visibility = if (item.isPrivateRoom) {
|
||||||
|
View.VISIBLE
|
||||||
|
} else {
|
||||||
|
View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
binding.root.setOnClickListener { onClick(item) }
|
binding.root.setOnClickListener { onClick(item) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,6 +164,12 @@ class LiveReservationAdapter(
|
|||||||
binding.tvCan.text = item.price.moneyFormat()
|
binding.tvCan.text = item.price.moneyFormat()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.ivLock.visibility = if (item.isPrivateRoom) {
|
||||||
|
View.VISIBLE
|
||||||
|
} else {
|
||||||
|
View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
binding.root.setOnClickListener { onClick(item) }
|
binding.root.setOnClickListener { onClick(item) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout 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: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="160dp"
|
android:layout_width="144dp"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_content_cover_image"
|
android:id="@+id/iv_content_cover_image"
|
||||||
android:layout_width="160dp"
|
android:layout_width="144dp"
|
||||||
android:layout_height="160dp"
|
android:layout_height="144dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@@ -54,5 +54,4 @@
|
|||||||
app:layout_constraintStart_toStartOf="@+id/tv_content_title"
|
app:layout_constraintStart_toStartOf="@+id/tv_content_title"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_content_title"
|
app:layout_constraintTop_toBottomOf="@+id/tv_content_title"
|
||||||
tools:text="빛이 나는 사람" />
|
tools:text="빛이 나는 사람" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
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="168dp"
|
android:layout_width="144dp"
|
||||||
android:layout_height="238dp"
|
android:layout_height="204dp"
|
||||||
android:background="@drawable/bg_home_creator"
|
app:cardBackgroundColor="#263238"
|
||||||
android:orientation="vertical"
|
app:cardCornerRadius="16dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<!-- 프로필 이미지 컨테이너 -->
|
<!-- 프로필 이미지 컨테이너 -->
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fl_profile"
|
android:id="@+id/fl_profile"
|
||||||
android:layout_width="76dp"
|
android:layout_width="84dp"
|
||||||
android:layout_height="76dp"
|
android:layout_height="84dp"
|
||||||
android:background="@drawable/circle_background"
|
android:background="@drawable/circle_background"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -21,57 +25,60 @@
|
|||||||
<!-- 프로필 이미지 -->
|
<!-- 프로필 이미지 -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_profile"
|
android:id="@+id/iv_profile"
|
||||||
android:layout_width="62dp"
|
android:layout_width="72dp"
|
||||||
android:layout_height="62dp"
|
android:layout_height="72dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:scaleType="centerCrop" />
|
android:scaleType="centerCrop" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginVertical="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/tv_time_ago"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/fl_profile">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_nickname"
|
android:id="@+id/tv_nickname"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:fontFamily="@font/pretendard_regular"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="18sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/fl_profile"
|
|
||||||
tools:text="도화" />
|
tools:text="도화" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="4dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/pretendard_regular"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="2"
|
android:maxLines="1"
|
||||||
android:textColor="#B0BEC5"
|
android:textColor="#B0BEC5"
|
||||||
android:textSize="14sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tv_time_ago"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_nickname"
|
|
||||||
tools:text="제목제목제목제목제목제목" />
|
tools:text="제목제목제목제목제목제목" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_time_ago"
|
android:id="@+id/tv_time_ago"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:fontFamily="@font/pretendard_regular"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="#78909C"
|
android:textColor="#78909C"
|
||||||
android:textSize="14sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:text="111" />
|
tools:text="111" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|||||||
@@ -10,13 +10,25 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="12dp">
|
android:padding="10dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_lock"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_lock"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<!-- 프로필 이미지 컨테이너 -->
|
<!-- 프로필 이미지 컨테이너 -->
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fl_profile"
|
android:id="@+id/fl_profile"
|
||||||
android:layout_width="84dp"
|
android:layout_width="84dp"
|
||||||
android:layout_height="84dp"
|
android:layout_height="84dp"
|
||||||
|
android:layout_marginHorizontal="2dp"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
android:background="@drawable/circle_background"
|
android:background="@drawable/circle_background"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -43,6 +55,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginHorizontal="2dp"
|
||||||
android:layout_marginVertical="8dp"
|
android:layout_marginVertical="8dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/fl_can"
|
app:layout_constraintBottom_toTopOf="@+id/fl_can"
|
||||||
@@ -78,6 +91,8 @@
|
|||||||
android:id="@+id/fl_can"
|
android:id="@+id/fl_can"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="2dp"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|||||||
@@ -37,6 +37,19 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_lock"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:background="@drawable/bg_circle_b3333333"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:src="@drawable/ic_lock"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_profile"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/iv_profile" />
|
||||||
|
|
||||||
<!-- Content Area -->
|
<!-- Content Area -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/live_booking_card_background"
|
android:background="@drawable/live_booking_card_background"
|
||||||
android:padding="14dp">
|
android:padding="12dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_profile"
|
android:id="@+id/iv_profile"
|
||||||
android:layout_width="107dp"
|
android:layout_width="96dp"
|
||||||
android:layout_height="107dp"
|
android:layout_height="96dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/ic_placeholder_profile"
|
android:src="@drawable/ic_placeholder_profile"
|
||||||
@@ -19,6 +19,20 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_lock"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:background="@drawable/bg_circle_b3333333"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:src="@drawable/ic_lock"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_profile"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/iv_profile" />
|
||||||
|
|
||||||
<!-- Content Area -->
|
<!-- Content Area -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -61,9 +75,9 @@
|
|||||||
android:layout_marginVertical="8dp"
|
android:layout_marginVertical="8dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/pretendard_regular"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:maxLines="2"
|
android:maxLines="1"
|
||||||
android:textColor="#B0BEC5"
|
android:textColor="#B0BEC5"
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
tools:text="평범한 가족의 아슬아슬한 이중생활..." />
|
tools:text="평범한 가족의 아슬아슬한 이중생활..." />
|
||||||
|
|
||||||
<!-- Time Info -->
|
<!-- Time Info -->
|
||||||
@@ -79,7 +93,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/pretendard_regular"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:textColor="#78909C"
|
android:textColor="#78909C"
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
tools:text="월" />
|
tools:text="월" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -89,7 +103,7 @@
|
|||||||
android:fontFamily="@font/pretendard_regular"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:text="|"
|
android:text="|"
|
||||||
android:textColor="#78909C"
|
android:textColor="#78909C"
|
||||||
android:textSize="16sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_time"
|
android:id="@+id/tv_time"
|
||||||
@@ -97,7 +111,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/pretendard_regular"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:textColor="#98A2F6"
|
android:textColor="#98A2F6"
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
tools:text="오후 03:30" />
|
tools:text="오후 03:30" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user