feat: 메인 라이브
- 변경된 커뮤니티 게시글 아이템 UI 적용
This commit is contained in:
@@ -896,6 +896,10 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
|
|||||||
item: GetCommunityPostListResponse,
|
item: GetCommunityPostListResponse,
|
||||||
index: Int
|
index: Int
|
||||||
) {
|
) {
|
||||||
|
val lp = layout.root.layoutParams
|
||||||
|
lp.width = screenWidth - 24.dpToPx().toInt() * 2
|
||||||
|
layout.root.layoutParams = lp
|
||||||
|
|
||||||
layout.ivCreatorProfile.loadUrl(item.creatorProfileUrl) {
|
layout.ivCreatorProfile.loadUrl(item.creatorProfileUrl) {
|
||||||
crossfade(true)
|
crossfade(true)
|
||||||
placeholder(R.drawable.ic_place_holder)
|
placeholder(R.drawable.ic_place_holder)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import kr.co.vividnext.sodalive.extensions.dpToPx
|
|||||||
import kr.co.vividnext.sodalive.extensions.loadUrl
|
import kr.co.vividnext.sodalive.extensions.loadUrl
|
||||||
|
|
||||||
class CreatorCommunityAdapter(
|
class CreatorCommunityAdapter(
|
||||||
|
private val width: Int,
|
||||||
private val onClickItem: (Long) -> Unit
|
private val onClickItem: (Long) -> Unit
|
||||||
) : RecyclerView.Adapter<CreatorCommunityAdapter.ViewHolder>() {
|
) : RecyclerView.Adapter<CreatorCommunityAdapter.ViewHolder>() {
|
||||||
|
|
||||||
@@ -51,6 +52,10 @@ class CreatorCommunityAdapter(
|
|||||||
binding.tvLikeCount.text = "${item.likeCount}"
|
binding.tvLikeCount.text = "${item.likeCount}"
|
||||||
binding.tvCommentCount.text = "${item.commentCount}"
|
binding.tvCommentCount.text = "${item.commentCount}"
|
||||||
|
|
||||||
|
val lp = binding.root.layoutParams
|
||||||
|
lp.width = width
|
||||||
|
binding.root.layoutParams = lp
|
||||||
|
|
||||||
binding.root.setOnClickListener { onClickItem(item.creatorId) }
|
binding.root.setOnClickListener { onClickItem(item.creatorId) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
package kr.co.vividnext.sodalive.home
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.graphics.Bitmap
|
|
||||||
import android.graphics.drawable.Drawable
|
|
||||||
import android.widget.FrameLayout
|
|
||||||
import android.widget.ImageView
|
|
||||||
import com.bumptech.glide.Glide
|
|
||||||
import com.bumptech.glide.request.target.CustomTarget
|
|
||||||
import com.bumptech.glide.request.transition.Transition
|
|
||||||
import com.zhpan.bannerview.BaseBannerAdapter
|
|
||||||
import com.zhpan.bannerview.BaseViewHolder
|
|
||||||
import kr.co.vividnext.sodalive.R
|
|
||||||
import kr.co.vividnext.sodalive.audition.GetAuditionListItem
|
|
||||||
|
|
||||||
class AuditionBannerAdapter(
|
|
||||||
private val context: Context,
|
|
||||||
private val itemWidth: Int,
|
|
||||||
private val itemHeight: Int,
|
|
||||||
private val onClick: (Long) -> Unit
|
|
||||||
) : BaseBannerAdapter<GetAuditionListItem>() {
|
|
||||||
override fun bindData(
|
|
||||||
holder: BaseViewHolder<GetAuditionListItem>,
|
|
||||||
data: GetAuditionListItem,
|
|
||||||
position: Int,
|
|
||||||
pageSize: Int
|
|
||||||
) {
|
|
||||||
val ivBanner = holder.findViewById<ImageView>(R.id.iv_recommend_live)
|
|
||||||
val layoutParams = ivBanner.layoutParams as FrameLayout.LayoutParams
|
|
||||||
|
|
||||||
layoutParams.width = itemWidth
|
|
||||||
layoutParams.height = itemHeight
|
|
||||||
|
|
||||||
Glide
|
|
||||||
.with(context)
|
|
||||||
.asBitmap()
|
|
||||||
.load(data.imageUrl)
|
|
||||||
.into(object : CustomTarget<Bitmap>() {
|
|
||||||
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
|
|
||||||
ivBanner.layoutParams = layoutParams
|
|
||||||
ivBanner.setImageBitmap(resource)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onLoadCleared(placeholder: Drawable?) {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
ivBanner.setOnClickListener { onClick(data.id) }
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getLayoutId(viewType: Int): Int {
|
|
||||||
return R.layout.item_recommend_live
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -69,7 +69,6 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
|
|||||||
private lateinit var homeContentAdapter: HomeContentAdapter
|
private lateinit var homeContentAdapter: HomeContentAdapter
|
||||||
private lateinit var contentBannerAdapter: AudioContentMainBannerAdapter
|
private lateinit var contentBannerAdapter: AudioContentMainBannerAdapter
|
||||||
private lateinit var originalSeriesAdapter: HomeSeriesAdapter
|
private lateinit var originalSeriesAdapter: HomeSeriesAdapter
|
||||||
private lateinit var auditionAdapter: AuditionBannerAdapter
|
|
||||||
private lateinit var seriesDayOfWeekAdapter: HomeSeriesAdapter
|
private lateinit var seriesDayOfWeekAdapter: HomeSeriesAdapter
|
||||||
private lateinit var weelyChartAdapter: HomeWeeklyChartAdapter
|
private lateinit var weelyChartAdapter: HomeWeeklyChartAdapter
|
||||||
private lateinit var recommendChannelAdapter: HomeRecommendChannelAdapter
|
private lateinit var recommendChannelAdapter: HomeRecommendChannelAdapter
|
||||||
|
|||||||
@@ -686,7 +686,9 @@ class LiveFragment : BaseFragment<FragmentLiveBinding>(FragmentLiveBinding::infl
|
|||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
private fun setupCommunityPost() {
|
private fun setupCommunityPost() {
|
||||||
creatorCommunityAdapter = CreatorCommunityAdapter {
|
creatorCommunityAdapter = CreatorCommunityAdapter(
|
||||||
|
width = (screenWidth - 48f.dpToPx()).toInt()
|
||||||
|
) {
|
||||||
if (SharedPreferenceManager.token.isNotBlank()) {
|
if (SharedPreferenceManager.token.isNotBlank()) {
|
||||||
startActivity(
|
startActivity(
|
||||||
Intent(
|
Intent(
|
||||||
|
|||||||
BIN
app/src/main/res/drawable-mdpi/ic_comment_78909c.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_comment_78909c.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 656 B |
BIN
app/src/main/res/drawable-mdpi/ic_heart_78909c.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_heart_78909c.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 677 B |
@@ -1,12 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="280dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:background="@drawable/bg_round_corner_10_3_222222"
|
android:background="@drawable/bg_round_corner_16_263238"
|
||||||
|
android:maxWidth="352dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="13.3dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -16,32 +17,37 @@
|
|||||||
android:id="@+id/iv_creator_profile"
|
android:id="@+id/iv_creator_profile"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
tools:src="@drawable/img_thumb_default" />
|
tools:src="@drawable/img_thumb_default" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/tv_creator_nickname"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginStart="11dp"
|
android:layout_marginStart="11dp"
|
||||||
android:layout_toStartOf="@+id/tv_date"
|
|
||||||
android:layout_toEndOf="@+id/iv_creator_profile"
|
android:layout_toEndOf="@+id/iv_creator_profile"
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
android:gravity="center_vertical"
|
||||||
android:textColor="@color/color_eeeeee"
|
android:orientation="vertical">
|
||||||
android:textSize="13.3sp"
|
|
||||||
tools:text="민하나" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_date"
|
android:id="@+id/tv_creator_nickname"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:fontFamily="@font/pretendard_bold"
|
||||||
android:layout_centerVertical="true"
|
android:textColor="@color/white"
|
||||||
android:fontFamily="@font/gmarket_sans_light"
|
android:textSize="18sp"
|
||||||
android:textColor="@color/color_777777"
|
tools:text="민하나" />
|
||||||
android:textSize="13.3sp"
|
|
||||||
tools:text="3일전" />
|
<TextView
|
||||||
|
android:id="@+id/tv_date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/pretendard_regular"
|
||||||
|
android:textColor="#78909C"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:text="3일전" />
|
||||||
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@@ -58,10 +64,11 @@
|
|||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_toStartOf="@+id/iv_post_image"
|
android:layout_toStartOf="@+id/iv_post_image"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:maxLines="3"
|
android:maxLines="3"
|
||||||
android:textColor="@color/color_bbbbbb"
|
android:textColor="#B0BEC5"
|
||||||
android:textSize="12sp"
|
android:textSize="18sp"
|
||||||
tools:text="안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요" />
|
tools:text="안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요안녕하세요" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -69,47 +76,48 @@
|
|||||||
android:layout_width="53.3dp"
|
android:layout_width="53.3dp"
|
||||||
android:layout_height="53.3dp"
|
android:layout_height="53.3dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:scaleType="centerCrop"
|
android:contentDescription="@null"
|
||||||
android:contentDescription="@null" />
|
android:scaleType="centerCrop" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="13.3dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="13.3dp"
|
android:layout_height="24dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/ic_heart_777" />
|
android:src="@drawable/ic_heart_78909c" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_like_count"
|
android:id="@+id/tv_like_count"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="6.7dp"
|
android:layout_marginStart="4dp"
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:textColor="@color/color_777777"
|
android:textColor="#78909C"
|
||||||
android:textSize="11sp"
|
android:textSize="18sp"
|
||||||
tools:text="10" />
|
tools:text="10" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="13.3dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="13.3dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginStart="13.3dp"
|
android:layout_marginStart="13.3dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/ic_message_square_777" />
|
android:src="@drawable/ic_comment_78909c" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_comment_count"
|
android:id="@+id/tv_comment_count"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="6.7dp"
|
android:layout_marginStart="4dp"
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:textColor="@color/color_777777"
|
android:textColor="#78909C"
|
||||||
android:textSize="11sp"
|
android:textSize="18sp"
|
||||||
tools:text="0" />
|
tools:text="0" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -20,10 +20,10 @@
|
|||||||
android:id="@+id/iv_write"
|
android:id="@+id/iv_write"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="13.3dp"
|
||||||
android:background="@drawable/bg_round_corner_13_3_333333_555555"
|
android:background="@drawable/bg_round_corner_13_3_333333_555555"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:padding="13dp"
|
android:padding="13dp"
|
||||||
android:layout_marginEnd="13.3dp"
|
|
||||||
android:src="@drawable/ic_make_message"
|
android:src="@drawable/ic_make_message"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
@@ -37,14 +37,15 @@
|
|||||||
android:id="@+id/ll_all"
|
android:id="@+id/ll_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="13.3dp"
|
||||||
|
android:gravity="center"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
android:layout_marginStart="13.3dp"
|
|
||||||
tools:ignore="UseCompoundDrawables">
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="40dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="48dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/btn_item_more" />
|
android:src="@drawable/btn_item_more" />
|
||||||
|
|
||||||
@@ -52,10 +53,11 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="11dp"
|
android:layout_marginTop="11dp"
|
||||||
android:fontFamily="@font/gmarket_sans_light"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
|
android:gravity="center"
|
||||||
android:text="더보기"
|
android:text="더보기"
|
||||||
android:textColor="@color/color_bbbbbb"
|
android:textColor="#B0BEC5"
|
||||||
android:textSize="11sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
@@ -82,19 +84,19 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10.3dp"
|
android:layout_marginTop="10.3dp"
|
||||||
android:fontFamily="@font/gmarket_sans_bold"
|
android:fontFamily="@font/pretendard_bold"
|
||||||
android:text="게시물 등록"
|
android:text="게시물 등록"
|
||||||
android:textColor="@color/color_eeeeee"
|
android:textColor="@color/color_eeeeee"
|
||||||
android:textSize="14.7sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10.3dp"
|
android:layout_marginTop="10.3dp"
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
android:fontFamily="@font/pretendard_regular"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="게시 후에 게시물이 여기에 표시되고\n커뮤니티에 공개됩니다."
|
android:text="게시 후에 게시물이 여기에 표시되고\n커뮤니티에 공개됩니다."
|
||||||
android:textColor="@color/color_777777"
|
android:textColor="@color/color_777777"
|
||||||
android:textSize="12sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user