fix(creator): 커뮤니티 리스트 표시를 보정한다
This commit is contained in:
@@ -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())
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,34 @@
|
||||
android:orientation="vertical"
|
||||
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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -65,21 +93,34 @@
|
||||
app:layout_constraintTop_toTopOf="@id/iv_creator_channel_community_list_profile"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_creator_channel_community_list_top_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_creator_channel_community_price"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="@dimen/spacing_4"
|
||||
android:paddingVertical="2dp"
|
||||
android:visibility="gone"
|
||||
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.Body5"
|
||||
style="@style/Typography.Caption3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/bg_creator_channel_community_price"
|
||||
android:drawableStart="@drawable/ic_bar_cash"
|
||||
android:drawablePadding="@dimen/spacing_4"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingHorizontal="@dimen/spacing_12"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="gone"
|
||||
tools:text="30"
|
||||
tools:visibility="visible" />
|
||||
tools:text="300" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_creator_channel_community_list_owner_more"
|
||||
@@ -93,18 +134,6 @@
|
||||
</LinearLayout>
|
||||
</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
|
||||
android:id="@+id/tv_creator_channel_community_list_body"
|
||||
style="@style/Typography.Body3"
|
||||
@@ -122,6 +151,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="236dp"
|
||||
android:layout_marginTop="@dimen/spacing_14"
|
||||
android:background="@drawable/bg_feed_community_image"
|
||||
android:visibility="gone"
|
||||
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 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_creator_channel_community_list_locked_price"
|
||||
style="@style/Typography.Caption2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginTop="@dimen/spacing_12"
|
||||
style="@style/Typography.Body3"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="@dimen/spacing_4"
|
||||
android:background="@drawable/bg_creator_channel_community_price"
|
||||
android:drawableStart="@drawable/ic_bar_cash"
|
||||
android:drawablePadding="@dimen/spacing_4"
|
||||
android:drawablePadding="@dimen/spacing_6"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingHorizontal="@dimen/spacing_8"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="gone"
|
||||
tools:text="30"
|
||||
|
||||
Reference in New Issue
Block a user