fix(creator): 커뮤니티 리스트 표시를 보정한다

This commit is contained in:
2026-06-22 14:28:08 +09:00
parent 8f5c55e0d1
commit b0346ae00c
2 changed files with 78 additions and 33 deletions

View File

@@ -5,8 +5,13 @@ import android.view.ViewGroup
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import coil.transform.CircleCropTransformation import coil.transform.CircleCropTransformation
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CenterCrop
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.bumptech.glide.request.RequestOptions
import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.databinding.ItemCreatorChannelCommunityListBinding import kr.co.vividnext.sodalive.databinding.ItemCreatorChannelCommunityListBinding
import kr.co.vividnext.sodalive.extensions.dpToPx
import kr.co.vividnext.sodalive.extensions.loadUrl import kr.co.vividnext.sodalive.extensions.loadUrl
import kr.co.vividnext.sodalive.extensions.moneyFormat import kr.co.vividnext.sodalive.extensions.moneyFormat
import kr.co.vividnext.sodalive.v2.creator.channel.community.model.CreatorChannelCommunityPostUiModel import kr.co.vividnext.sodalive.v2.creator.channel.community.model.CreatorChannelCommunityPostUiModel
@@ -54,7 +59,7 @@ class CreatorChannelCommunityListAdapter(
} }
tvCreatorChannelCommunityListNickname.text = item.creatorNickname tvCreatorChannelCommunityListNickname.text = item.creatorNickname
tvCreatorChannelCommunityListTime.text = item.createdAtText tvCreatorChannelCommunityListTime.text = item.createdAtText
tvCreatorChannelCommunityListNotice.isVisible = item.showNotice layoutCreatorChannelCommunityListNotice.isVisible = item.showNotice
tvCreatorChannelCommunityListBody.text = item.content tvCreatorChannelCommunityListBody.text = item.content
tvCreatorChannelCommunityListCommentCount.text = item.commentCount.moneyFormat() tvCreatorChannelCommunityListCommentCount.text = item.commentCount.moneyFormat()
tvCreatorChannelCommunityListCommentCount.isVisible = item.showComment tvCreatorChannelCommunityListCommentCount.isVisible = item.showComment
@@ -66,8 +71,13 @@ class CreatorChannelCommunityListAdapter(
visibleImageUrl != null || item.isLocked || item.showPlayButton visibleImageUrl != null || item.isLocked || item.showPlayButton
ivCreatorChannelCommunityListImage.isVisible = visibleImageUrl != null ivCreatorChannelCommunityListImage.isVisible = visibleImageUrl != null
if (visibleImageUrl != null) { if (visibleImageUrl != null) {
ivCreatorChannelCommunityListImage.loadUrl(visibleImageUrl) Glide.with(ivCreatorChannelCommunityListImage)
.load(visibleImageUrl)
.placeholder(R.drawable.ic_place_holder)
.apply(communityImageRequestOptions())
.into(ivCreatorChannelCommunityListImage)
} else { } else {
Glide.with(ivCreatorChannelCommunityListImage).clear(ivCreatorChannelCommunityListImage)
ivCreatorChannelCommunityListImage.setImageDrawable(null) ivCreatorChannelCommunityListImage.setImageDrawable(null)
} }
layoutCreatorChannelCommunityListLockedOverlay.isVisible = item.isLocked layoutCreatorChannelCommunityListLockedOverlay.isVisible = item.isLocked
@@ -81,10 +91,17 @@ class CreatorChannelCommunityListAdapter(
ivCreatorChannelCommunityListPlay.setOnClickListener { onPlayClick(item) } ivCreatorChannelCommunityListPlay.setOnClickListener { onPlayClick(item) }
layoutCreatorChannelCommunityListTopActions.isVisible = item.showOwnerMore || item.showOwnerTopPrice layoutCreatorChannelCommunityListTopActions.isVisible = item.showOwnerMore || item.showOwnerTopPrice
tvCreatorChannelCommunityListTopPrice.isVisible = item.showOwnerTopPrice layoutCreatorChannelCommunityListTopPrice.isVisible = item.showOwnerTopPrice
tvCreatorChannelCommunityListTopPrice.text = item.price.moneyFormat() tvCreatorChannelCommunityListTopPrice.text = item.price.moneyFormat()
ivCreatorChannelCommunityListOwnerMore.isVisible = item.showOwnerMore ivCreatorChannelCommunityListOwnerMore.isVisible = item.showOwnerMore
ivCreatorChannelCommunityListOwnerMore.setOnClickListener { onOwnerMoreClick(item) } ivCreatorChannelCommunityListOwnerMore.setOnClickListener { onOwnerMoreClick(item) }
} }
private fun communityImageRequestOptions(): RequestOptions {
return RequestOptions().transform(
CenterCrop(),
RoundedCorners(14f.dpToPx().toInt())
)
}
} }
} }

View File

@@ -9,6 +9,34 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/spacing_14"> android:padding="@dimen/spacing_14">
<LinearLayout
android:id="@+id/layout_creator_channel_community_list_notice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/spacing_14"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:contentDescription="@null"
android:src="@drawable/ic_pin" />
<TextView
android:id="@+id/tv_creator_channel_community_list_notice"
style="@style/Typography.Body5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:includeFontPadding="false"
android:text="@string/creator_channel_community_notice"
android:textColor="@color/green_400"
tools:text="Notice" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@@ -65,21 +93,34 @@
app:layout_constraintTop_toTopOf="@id/iv_creator_channel_community_list_profile" app:layout_constraintTop_toTopOf="@id/iv_creator_channel_community_list_profile"
tools:visibility="visible"> tools:visibility="visible">
<TextView <LinearLayout
android:id="@+id/tv_creator_channel_community_list_top_price" android:id="@+id/layout_creator_channel_community_list_top_price"
style="@style/Typography.Body5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="36dp" android:layout_height="wrap_content"
android:background="@drawable/bg_creator_channel_community_price" android:background="@drawable/bg_creator_channel_community_price"
android:drawableStart="@drawable/ic_bar_cash"
android:drawablePadding="@dimen/spacing_4"
android:gravity="center" android:gravity="center"
android:includeFontPadding="false" android:orientation="horizontal"
android:paddingHorizontal="@dimen/spacing_12" android:paddingHorizontal="@dimen/spacing_4"
android:textColor="@color/black" android:paddingVertical="2dp"
android:visibility="gone" android:visibility="gone"
tools:text="30" tools:visibility="visible">
tools:visibility="visible" />
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:contentDescription="@null"
android:src="@drawable/ic_bar_cash" />
<TextView
android:id="@+id/tv_creator_channel_community_list_top_price"
style="@style/Typography.Caption3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:includeFontPadding="false"
android:textColor="@color/black"
tools:text="300" />
</LinearLayout>
<ImageView <ImageView
android:id="@+id/iv_creator_channel_community_list_owner_more" android:id="@+id/iv_creator_channel_community_list_owner_more"
@@ -93,18 +134,6 @@
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_creator_channel_community_list_notice"
style="@style/Typography.Caption2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_14"
android:includeFontPadding="false"
android:text="@string/creator_channel_community_notice"
android:textColor="@color/soda_400"
android:visibility="gone"
tools:visibility="visible" />
<TextView <TextView
android:id="@+id/tv_creator_channel_community_list_body" android:id="@+id/tv_creator_channel_community_list_body"
style="@style/Typography.Body3" style="@style/Typography.Body3"
@@ -122,6 +151,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="236dp" android:layout_height="236dp"
android:layout_marginTop="@dimen/spacing_14" android:layout_marginTop="@dimen/spacing_14"
android:background="@drawable/bg_feed_community_image"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
@@ -129,7 +159,6 @@
android:id="@+id/iv_creator_channel_community_list_image" android:id="@+id/iv_creator_channel_community_list_image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/bg_feed_community_image"
android:contentDescription="@string/a11y_feed_content_image" android:contentDescription="@string/a11y_feed_content_image"
android:scaleType="centerCrop" android:scaleType="centerCrop"
tools:src="@drawable/ic_launcher_background" /> tools:src="@drawable/ic_launcher_background" />
@@ -160,16 +189,15 @@
<TextView <TextView
android:id="@+id/tv_creator_channel_community_list_locked_price" android:id="@+id/tv_creator_channel_community_list_locked_price"
style="@style/Typography.Caption2" style="@style/Typography.Body3"
android:layout_width="wrap_content" android:layout_width="70dp"
android:layout_height="32dp" android:layout_height="36dp"
android:layout_marginTop="@dimen/spacing_12" android:layout_marginTop="@dimen/spacing_4"
android:background="@drawable/bg_creator_channel_community_price" android:background="@drawable/bg_creator_channel_community_price"
android:drawableStart="@drawable/ic_bar_cash" android:drawableStart="@drawable/ic_bar_cash"
android:drawablePadding="@dimen/spacing_4" android:drawablePadding="@dimen/spacing_6"
android:gravity="center" android:gravity="center"
android:includeFontPadding="false" android:includeFontPadding="false"
android:paddingHorizontal="@dimen/spacing_8"
android:textColor="@color/black" android:textColor="@color/black"
android:visibility="gone" android:visibility="gone"
tools:text="30" tools:text="30"