diff --git a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/ui/CreatorChannelCommunityListAdapter.kt b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/ui/CreatorChannelCommunityListAdapter.kt
index 2fffd8ca..bd327525 100644
--- a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/ui/CreatorChannelCommunityListAdapter.kt
+++ b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/community/ui/CreatorChannelCommunityListAdapter.kt
@@ -5,8 +5,13 @@ import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
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.databinding.ItemCreatorChannelCommunityListBinding
+import kr.co.vividnext.sodalive.extensions.dpToPx
import kr.co.vividnext.sodalive.extensions.loadUrl
import kr.co.vividnext.sodalive.extensions.moneyFormat
import kr.co.vividnext.sodalive.v2.creator.channel.community.model.CreatorChannelCommunityPostUiModel
@@ -54,7 +59,7 @@ class CreatorChannelCommunityListAdapter(
}
tvCreatorChannelCommunityListNickname.text = item.creatorNickname
tvCreatorChannelCommunityListTime.text = item.createdAtText
- tvCreatorChannelCommunityListNotice.isVisible = item.showNotice
+ layoutCreatorChannelCommunityListNotice.isVisible = item.showNotice
tvCreatorChannelCommunityListBody.text = item.content
tvCreatorChannelCommunityListCommentCount.text = item.commentCount.moneyFormat()
tvCreatorChannelCommunityListCommentCount.isVisible = item.showComment
@@ -66,8 +71,13 @@ class CreatorChannelCommunityListAdapter(
visibleImageUrl != null || item.isLocked || item.showPlayButton
ivCreatorChannelCommunityListImage.isVisible = visibleImageUrl != null
if (visibleImageUrl != null) {
- ivCreatorChannelCommunityListImage.loadUrl(visibleImageUrl)
+ Glide.with(ivCreatorChannelCommunityListImage)
+ .load(visibleImageUrl)
+ .placeholder(R.drawable.ic_place_holder)
+ .apply(communityImageRequestOptions())
+ .into(ivCreatorChannelCommunityListImage)
} else {
+ Glide.with(ivCreatorChannelCommunityListImage).clear(ivCreatorChannelCommunityListImage)
ivCreatorChannelCommunityListImage.setImageDrawable(null)
}
layoutCreatorChannelCommunityListLockedOverlay.isVisible = item.isLocked
@@ -81,10 +91,17 @@ class CreatorChannelCommunityListAdapter(
ivCreatorChannelCommunityListPlay.setOnClickListener { onPlayClick(item) }
layoutCreatorChannelCommunityListTopActions.isVisible = item.showOwnerMore || item.showOwnerTopPrice
- tvCreatorChannelCommunityListTopPrice.isVisible = item.showOwnerTopPrice
+ layoutCreatorChannelCommunityListTopPrice.isVisible = item.showOwnerTopPrice
tvCreatorChannelCommunityListTopPrice.text = item.price.moneyFormat()
ivCreatorChannelCommunityListOwnerMore.isVisible = item.showOwnerMore
ivCreatorChannelCommunityListOwnerMore.setOnClickListener { onOwnerMoreClick(item) }
}
+
+ private fun communityImageRequestOptions(): RequestOptions {
+ return RequestOptions().transform(
+ CenterCrop(),
+ RoundedCorners(14f.dpToPx().toInt())
+ )
+ }
}
}
diff --git a/app/src/main/res/layout/item_creator_channel_community_list.xml b/app/src/main/res/layout/item_creator_channel_community_list.xml
index e6df5143..b6dcd0f6 100644
--- a/app/src/main/res/layout/item_creator_channel_community_list.xml
+++ b/app/src/main/res/layout/item_creator_channel_community_list.xml
@@ -9,6 +9,34 @@
android:orientation="vertical"
android:padding="@dimen/spacing_14">
+
+
+
+
+
+
+
@@ -65,21 +93,34 @@
app:layout_constraintTop_toTopOf="@id/iv_creator_channel_community_list_profile"
tools:visibility="visible">
-
+ tools:visibility="visible">
+
+
+
+
+
-
-
@@ -129,7 +159,6 @@
android:id="@+id/iv_creator_channel_community_list_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/bg_feed_community_image"
android:contentDescription="@string/a11y_feed_content_image"
android:scaleType="centerCrop"
tools:src="@drawable/ic_launcher_background" />
@@ -160,16 +189,15 @@