fix(home): 팔로잉 탭 후속 검증을 반영한다
This commit is contained in:
@@ -20,6 +20,7 @@ import kr.co.vividnext.sodalive.v2.access.AccessRequirement
|
||||
import kr.co.vividnext.sodalive.v2.access.ensureV2Access
|
||||
import kr.co.vividnext.sodalive.v2.chat.action.ChatActionCommand
|
||||
import kr.co.vividnext.sodalive.v2.chat.action.handleChatAction
|
||||
import kr.co.vividnext.sodalive.v2.common.CreatorActivityType
|
||||
import kr.co.vividnext.sodalive.v2.community.action.CommunityActionCommand
|
||||
import kr.co.vividnext.sodalive.v2.community.action.handleCommunityAction
|
||||
import kr.co.vividnext.sodalive.v2.content.action.ContentActionCommand
|
||||
@@ -30,6 +31,7 @@ import kr.co.vividnext.sodalive.v2.live.action.LiveActionCoordinator
|
||||
import kr.co.vividnext.sodalive.v2.live.onair.HomeOnAirLiveActivity
|
||||
import kr.co.vividnext.sodalive.v2.main.chat.model.ChatRoomListUiItem
|
||||
import kr.co.vividnext.sodalive.v2.main.chat.model.ChatRoomType
|
||||
import kr.co.vividnext.sodalive.v2.main.home.data.FollowingNewsType
|
||||
import kr.co.vividnext.sodalive.v2.main.home.model.HomeFollowingChatSection
|
||||
import kr.co.vividnext.sodalive.v2.main.home.model.HomeFollowingCreatorSection
|
||||
import kr.co.vividnext.sodalive.v2.main.home.model.HomeFollowingLiveSection
|
||||
@@ -409,7 +411,10 @@ class HomeMainFragment : BaseFragment<FragmentV2MainHomeBinding>(
|
||||
bindHomeFollowingEmpty(showEmptyMessage = true)
|
||||
finishHomePullRefresh(HOME_TAB_FOLLOWING)
|
||||
}
|
||||
HomeFollowingUiState.LoginRequired -> bindHomeFollowingEmpty(showEmptyMessage = false)
|
||||
HomeFollowingUiState.LoginRequired -> {
|
||||
bindHomeFollowingEmpty(showEmptyMessage = false)
|
||||
finishHomePullRefresh(HOME_TAB_FOLLOWING)
|
||||
}
|
||||
is HomeFollowingUiState.Error -> {
|
||||
if (shouldPreserveHomeContentOnPullRefreshError(HOME_TAB_FOLLOWING)) return@observe
|
||||
bindHomeFollowingEmpty(showEmptyMessage = false)
|
||||
@@ -665,15 +670,38 @@ class HomeMainFragment : BaseFragment<FragmentV2MainHomeBinding>(
|
||||
|
||||
private fun onFollowingSectionMoreClick(section: HomeFollowingSection) = Unit
|
||||
|
||||
private fun onFollowingLiveClick(item: HomeFollowingLiveUiItem) = Unit
|
||||
private fun onFollowingLiveClick(item: HomeFollowingLiveUiItem) {
|
||||
liveActionCoordinator.enterLiveRoom(item.liveId)
|
||||
}
|
||||
|
||||
private fun onFollowingScheduleClick(item: HomeFollowingScheduleUiItem) = Unit
|
||||
private fun onFollowingScheduleClick(item: HomeFollowingScheduleUiItem) {
|
||||
if (item.targetId <= 0L) return
|
||||
when (item.type) {
|
||||
CreatorActivityType.Live -> liveActionCoordinator.enterLiveRoom(item.targetId)
|
||||
CreatorActivityType.LiveReplay,
|
||||
CreatorActivityType.Audio -> handleContentAction(
|
||||
ContentActionCommand.AudioDetail(audioContentId = item.targetId)
|
||||
)
|
||||
CreatorActivityType.Community -> handleCommunityAction(
|
||||
CommunityActionCommand.PostDetail(item.targetId)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun onFollowingNewsClick(item: HomeFollowingNewsUiItem) {
|
||||
val community = item as? HomeFollowingNewsUiItem.Community ?: return
|
||||
val postId = community.postId
|
||||
if (postId <= 0L) return
|
||||
handleCommunityAction(CommunityActionCommand.PostDetail(postId))
|
||||
when (item) {
|
||||
is HomeFollowingNewsUiItem.Ranking -> if (item.type == FollowingNewsType.CREATOR_RANKING) {
|
||||
handleCreatorAction(CreatorActionCommand.Profile(item.targetId))
|
||||
}
|
||||
is HomeFollowingNewsUiItem.Content -> if (item.type == FollowingNewsType.AUDIO_CONTENT) {
|
||||
handleContentAction(ContentActionCommand.AudioDetail(audioContentId = item.contentId))
|
||||
}
|
||||
is HomeFollowingNewsUiItem.Community -> {
|
||||
val postId = item.postId
|
||||
if (postId <= 0L) return
|
||||
handleCommunityAction(CommunityActionCommand.PostDetail(postId))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun openFollowingCreatorAll() {
|
||||
|
||||
+1
-13
@@ -1,7 +1,5 @@
|
||||
package kr.co.vividnext.sodalive.v2.main.home.model
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.common.UtcRelativeTimeTextFormatter
|
||||
import kr.co.vividnext.sodalive.v2.main.chat.model.toUiItems
|
||||
import kr.co.vividnext.sodalive.v2.main.home.data.FollowingCommunityPostNewsResponse
|
||||
@@ -123,8 +121,7 @@ private fun FollowingContentNewsResponse.toUiItem(
|
||||
contentImageUrl = contentImageUrl,
|
||||
title = title,
|
||||
creatorProfileImageUrl = creatorProfileImageUrl,
|
||||
creatorNickname = creatorNickname,
|
||||
labelResId = type.toLabelResId()
|
||||
creatorNickname = creatorNickname
|
||||
)
|
||||
|
||||
private fun FollowingCommunityPostNewsResponse.toUiItem(
|
||||
@@ -147,12 +144,3 @@ private fun FollowingCommunityPostNewsResponse.toUiItem(
|
||||
likeCount = likeCount,
|
||||
commentCount = commentCount
|
||||
)
|
||||
|
||||
@StringRes
|
||||
private fun FollowingNewsType.toLabelResId(): Int = when (this) {
|
||||
FollowingNewsType.PHOTO_CONTENT -> R.string.screen_home_following_photo_content
|
||||
FollowingNewsType.AUDIO_CONTENT -> R.string.home_recommendation_activity_audio
|
||||
FollowingNewsType.COMMUNITY_POST -> R.string.home_recommendation_activity_community
|
||||
FollowingNewsType.CREATOR_RANKING,
|
||||
FollowingNewsType.CONTENT_RANKING -> R.string.weekly_chart
|
||||
}
|
||||
|
||||
+1
-2
@@ -81,8 +81,7 @@ sealed interface HomeFollowingNewsUiItem {
|
||||
val contentImageUrl: String?,
|
||||
val title: String,
|
||||
val creatorProfileImageUrl: String,
|
||||
val creatorNickname: String,
|
||||
@param:StringRes val labelResId: Int
|
||||
val creatorNickname: String
|
||||
) : HomeFollowingNewsUiItem
|
||||
|
||||
data class Community(
|
||||
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package kr.co.vividnext.sodalive.v2.main.home.ui
|
||||
|
||||
import android.widget.ImageView
|
||||
import coil.dispose
|
||||
import coil.transform.CircleCropTransformation
|
||||
import coil.transform.Transformation
|
||||
import kr.co.vividnext.sodalive.extensions.loadUrl
|
||||
@@ -9,6 +10,7 @@ fun homeCreatorProfileImageTransformations(): List<Transformation> = listOf(Circ
|
||||
|
||||
fun ImageView.loadHomeCreatorProfileImage(url: String?) {
|
||||
if (url.isNullOrBlank()) {
|
||||
dispose()
|
||||
setImageDrawable(null)
|
||||
} else {
|
||||
loadUrl(url) {
|
||||
|
||||
+3
-1
@@ -22,7 +22,9 @@ class HomeFollowingChatAdapter(
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ChatViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_home_following_chat, parent, false)
|
||||
view.layoutParams = recyclerItemLayoutParams(parent)
|
||||
val layoutParams = view.layoutParams as RecyclerView.LayoutParams
|
||||
layoutParams.marginEnd = parent.resources.getDimensionPixelSize(R.dimen.spacing_12)
|
||||
view.layoutParams = layoutParams
|
||||
return ChatViewHolder(view, onClickItem)
|
||||
}
|
||||
|
||||
|
||||
+8
-7
@@ -21,14 +21,15 @@ class HomeFollowingLiveAdapter(
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): LiveViewHolder {
|
||||
return LiveViewHolder(
|
||||
LayoutInflater.from(parent.context).inflate(
|
||||
R.layout.item_home_following_live,
|
||||
parent,
|
||||
false
|
||||
),
|
||||
onClickItem
|
||||
val view = LayoutInflater.from(parent.context).inflate(
|
||||
R.layout.item_home_following_live,
|
||||
parent,
|
||||
false
|
||||
)
|
||||
val layoutParams = view.layoutParams as RecyclerView.LayoutParams
|
||||
layoutParams.marginEnd = parent.resources.getDimensionPixelSize(R.dimen.spacing_12)
|
||||
view.layoutParams = layoutParams
|
||||
return LiveViewHolder(view, onClickItem)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: LiveViewHolder, position: Int) {
|
||||
|
||||
+38
-30
@@ -1,9 +1,11 @@
|
||||
package kr.co.vividnext.sodalive.v2.main.home.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import coil.dispose
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.extensions.loadUrl
|
||||
import kr.co.vividnext.sodalive.v2.main.home.data.FollowingNewsType
|
||||
@@ -19,6 +21,38 @@ import kr.co.vividnext.sodalive.v2.widget.feed.FeedWidthMode
|
||||
import kr.co.vividnext.sodalive.v2.widget.feed.FeedCommunityView
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
internal fun buildHomeFollowingRankingFeedItem(
|
||||
context: Context,
|
||||
ranking: HomeFollowingNewsUiItem.Ranking
|
||||
): FeedItem.Rank {
|
||||
val rankText = context.getString(R.string.screen_home_following_ranking_rank_format, ranking.rank)
|
||||
val message = ranking.toRankingMessage(context, rankText)
|
||||
return FeedItem.Rank(
|
||||
feedId = ranking.newsId,
|
||||
imageUrl = ranking.imageUrl.orEmpty(),
|
||||
rankText = ranking.rank.toString(),
|
||||
message = message,
|
||||
highlightRanges = listOf(
|
||||
FeedRankHighlight(
|
||||
start = message.lastIndexOf(rankText),
|
||||
endExclusive = message.lastIndexOf(rankText) + rankText.length
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private fun HomeFollowingNewsUiItem.Ranking.toRankingMessage(context: Context, rankText: String): String {
|
||||
val messageResId = when (type) {
|
||||
FollowingNewsType.CREATOR_RANKING -> R.string.screen_home_following_creator_ranking_news_message
|
||||
FollowingNewsType.CONTENT_RANKING -> R.string.screen_home_following_content_ranking_news_message
|
||||
FollowingNewsType.COMMUNITY_POST,
|
||||
FollowingNewsType.AUDIO_CONTENT,
|
||||
FollowingNewsType.PHOTO_CONTENT -> R.string.screen_home_following_content_ranking_news_message
|
||||
}
|
||||
val subject = if (type == FollowingNewsType.CREATOR_RANKING) creatorNickname else title
|
||||
return context.getString(messageResId, subject, rankText)
|
||||
}
|
||||
|
||||
class HomeFollowingNewsAdapter(
|
||||
private val onClickItem: (HomeFollowingNewsUiItem) -> Unit = {}
|
||||
) : RecyclerView.Adapter<HomeFollowingNewsAdapter.NewsViewHolder>() {
|
||||
@@ -73,39 +107,12 @@ class HomeFollowingNewsAdapter(
|
||||
|
||||
override fun bind(item: HomeFollowingNewsUiItem) {
|
||||
val ranking = item as HomeFollowingNewsUiItem.Ranking
|
||||
val context = view.context
|
||||
val rankText = "${ranking.rank}위"
|
||||
val message = ranking.toRankingMessage(rankText)
|
||||
val feedItem = FeedItem.Rank(
|
||||
feedId = ranking.newsId,
|
||||
imageUrl = ranking.imageUrl.orEmpty(),
|
||||
rankText = ranking.rank.toString(),
|
||||
message = message,
|
||||
highlightRanges = listOf(
|
||||
FeedRankHighlight(
|
||||
start = message.indexOf(rankText),
|
||||
endExclusive = message.indexOf(rankText) + rankText.length
|
||||
)
|
||||
)
|
||||
)
|
||||
val feedItem = buildHomeFollowingRankingFeedItem(view.context, ranking)
|
||||
view.setFeedSize(feedSize(FeedVariant.Rank, parent))
|
||||
view.bind(feedItem)
|
||||
bindImage(view.imageView(), feedItem.imageUrl)
|
||||
view.setOnFeedClick { onClickItem(ranking) }
|
||||
}
|
||||
|
||||
private fun HomeFollowingNewsUiItem.Ranking.toRankingMessage(rankText: String): String {
|
||||
val messageResId = when (type) {
|
||||
FollowingNewsType.CREATOR_RANKING -> R.string.screen_home_following_creator_ranking_news_message
|
||||
FollowingNewsType.CONTENT_RANKING -> R.string.screen_home_following_content_ranking_news_message
|
||||
FollowingNewsType.COMMUNITY_POST,
|
||||
FollowingNewsType.AUDIO_CONTENT,
|
||||
FollowingNewsType.PHOTO_CONTENT -> R.string.screen_home_following_content_ranking_news_message
|
||||
}
|
||||
val subject = if (type == FollowingNewsType.CREATOR_RANKING) creatorNickname else title
|
||||
val context = view.context
|
||||
return context.getString(messageResId, subject, rankText)
|
||||
}
|
||||
}
|
||||
|
||||
class CommunityViewHolder(
|
||||
@@ -118,7 +125,7 @@ class HomeFollowingNewsAdapter(
|
||||
val community = item as HomeFollowingNewsUiItem.Community
|
||||
val feedItem = FeedItem.Community(
|
||||
feedId = community.newsId,
|
||||
creatorId = community.targetId.toString(),
|
||||
creatorId = "",
|
||||
creatorName = community.creatorNickname,
|
||||
creatorImageUrl = community.creatorProfileImageUrl,
|
||||
postId = community.postId.toString(),
|
||||
@@ -149,7 +156,7 @@ class HomeFollowingNewsAdapter(
|
||||
val content = item as HomeFollowingNewsUiItem.Content
|
||||
val feedItem = FeedItem.Content(
|
||||
feedId = content.newsId,
|
||||
creatorId = content.targetId.toString(),
|
||||
creatorId = "",
|
||||
creatorName = content.creatorNickname,
|
||||
creatorImageUrl = content.creatorProfileImageUrl,
|
||||
contentId = content.contentId.toString(),
|
||||
@@ -184,6 +191,7 @@ class HomeFollowingNewsAdapter(
|
||||
onImageLoaded: ((Int, Int) -> Unit)? = null
|
||||
) {
|
||||
if (url.isBlank()) {
|
||||
imageView.dispose()
|
||||
imageView.setImageDrawable(null)
|
||||
} else {
|
||||
imageView.loadUrl(url) {
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
package kr.co.vividnext.sodalive.v2.widget.feed
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class FeedAdapter(
|
||||
private val widthMode: FeedWidthMode = FeedWidthMode.FigmaFixed,
|
||||
private val horizontalItemDecorationDp: Int = 0,
|
||||
private val onClickItem: (FeedItem) -> Unit,
|
||||
private val onBindImages: (FeedImageViews, FeedItem) -> Unit = { _, _ -> }
|
||||
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private val items = mutableListOf<FeedItem>()
|
||||
|
||||
override fun getItemViewType(position: Int): Int = when (items[position].variant) {
|
||||
FeedVariant.Rank -> VIEW_TYPE_RANK
|
||||
FeedVariant.Live -> VIEW_TYPE_LIVE
|
||||
FeedVariant.Content -> VIEW_TYPE_CONTENT
|
||||
FeedVariant.Community -> VIEW_TYPE_COMMUNITY
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
val inflater = LayoutInflater.from(parent.context)
|
||||
return when (viewType) {
|
||||
VIEW_TYPE_RANK -> RankViewHolder(inflater.inflate(R.layout.view_feed_rank, parent, false) as FeedRankView, parent)
|
||||
VIEW_TYPE_LIVE -> LiveViewHolder(inflater.inflate(R.layout.view_feed_live, parent, false) as FeedLiveView, parent)
|
||||
VIEW_TYPE_CONTENT -> ContentViewHolder(
|
||||
inflater.inflate(R.layout.view_feed_content, parent, false) as FeedContentView,
|
||||
parent
|
||||
)
|
||||
VIEW_TYPE_COMMUNITY -> CommunityViewHolder(
|
||||
inflater.inflate(R.layout.view_feed_community, parent, false) as FeedCommunityView,
|
||||
parent
|
||||
)
|
||||
else -> error("Unknown viewType: $viewType")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
when (val item = items[position]) {
|
||||
is FeedItem.Rank -> (holder as RankViewHolder).bind(item)
|
||||
is FeedItem.Live -> (holder as LiveViewHolder).bind(item)
|
||||
is FeedItem.Content -> (holder as ContentViewHolder).bind(item)
|
||||
is FeedItem.Community -> (holder as CommunityViewHolder).bind(item)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = items.size
|
||||
|
||||
fun submitItems(items: List<FeedItem>) {
|
||||
this.items.clear()
|
||||
this.items.addAll(items)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
private inner class RankViewHolder(
|
||||
private val view: FeedRankView,
|
||||
private val parent: ViewGroup
|
||||
) : RecyclerView.ViewHolder(view) {
|
||||
fun bind(item: FeedItem.Rank) {
|
||||
view.setFeedSize(calculateSize(item.variant, parent))
|
||||
view.bind(item)
|
||||
view.setOnFeedClick(onClickItem)
|
||||
onBindImages(FeedImageViews(primary = view.imageView()), item)
|
||||
}
|
||||
}
|
||||
|
||||
private inner class LiveViewHolder(
|
||||
private val view: FeedLiveView,
|
||||
private val parent: ViewGroup
|
||||
) : RecyclerView.ViewHolder(view) {
|
||||
fun bind(item: FeedItem.Live) {
|
||||
view.setFeedSize(calculateSize(item.variant, parent))
|
||||
view.bind(item)
|
||||
view.setOnFeedClick(onClickItem)
|
||||
onBindImages(FeedImageViews(profile = view.profileImageView()), item)
|
||||
}
|
||||
}
|
||||
|
||||
private inner class ContentViewHolder(
|
||||
private val view: FeedContentView,
|
||||
private val parent: ViewGroup
|
||||
) : RecyclerView.ViewHolder(view) {
|
||||
fun bind(item: FeedItem.Content) {
|
||||
view.setFeedSize(calculateSize(item.variant, parent))
|
||||
view.bind(item)
|
||||
view.setOnFeedClick(onClickItem)
|
||||
onBindImages(FeedImageViews(primary = view.contentImageView(), profile = view.profileImageView()), item)
|
||||
}
|
||||
}
|
||||
|
||||
private inner class CommunityViewHolder(
|
||||
private val view: FeedCommunityView,
|
||||
private val parent: ViewGroup
|
||||
) : RecyclerView.ViewHolder(view) {
|
||||
fun bind(item: FeedItem.Community) {
|
||||
view.setFeedSize(calculateSize(item.variant, parent))
|
||||
view.bind(item)
|
||||
view.setOnFeedClick(onClickItem)
|
||||
onBindImages(FeedImageViews(primary = view.communityImageView(), profile = view.profileImageView()), item)
|
||||
}
|
||||
}
|
||||
|
||||
private fun calculateSize(variant: FeedVariant, parent: ViewGroup): FeedSize {
|
||||
val parentWidthPx = parent.width.takeIf { it > 0 } ?: parent.resources.displayMetrics.widthPixels
|
||||
val availableWidthPx = parentWidthPx - parent.paddingLeft - parent.paddingRight
|
||||
val availableWidthDp = (availableWidthPx / parent.resources.displayMetrics.density).roundToInt()
|
||||
return FeedSize.from(variant, widthMode, availableWidthDp, horizontalItemDecorationDp)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val VIEW_TYPE_RANK = 1
|
||||
private const val VIEW_TYPE_LIVE = 2
|
||||
private const val VIEW_TYPE_CONTENT = 3
|
||||
private const val VIEW_TYPE_COMMUNITY = 4
|
||||
}
|
||||
}
|
||||
|
||||
data class FeedImageViews(
|
||||
val primary: ImageView? = null,
|
||||
val profile: ImageView? = null
|
||||
)
|
||||
@@ -365,7 +365,7 @@
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="@dimen/spacing_14"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_home_following_news_content" />
|
||||
tools:listitem="@layout/view_feed_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_feed_card"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/spacing_14">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_home_following_news_creator_profile"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="@drawable/bg_round_corner_999_263238"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@drawable/ic_placeholder_profile" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_8"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_following_news_creator_nickname"
|
||||
style="@style/Typography.Body5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
tools:text="크리에이터 이름" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_following_news_created_at"
|
||||
style="@style/Typography.Body6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/gray_500"
|
||||
tools:text="2분 전" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_following_news_title"
|
||||
style="@style/Typography.Heading4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_14"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
tools:text="콘텐츠 이름" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_following_news_label"
|
||||
style="@style/Typography.Caption3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_feed_category_tag"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingHorizontal="@dimen/spacing_4"
|
||||
android:paddingVertical="2dp"
|
||||
android:textColor="@color/gray_100"
|
||||
tools:text="오디오" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_12"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_following_news_content"
|
||||
style="@style/Typography.Body3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="4"
|
||||
android:textColor="@color/white"
|
||||
tools:text="크리에이터가 남긴 최근 소식이 노출됩니다. 긴 내용은 말줄임 처리합니다." />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_home_following_news_thumbnail"
|
||||
android:layout_width="92dp"
|
||||
android:layout_height="92dp"
|
||||
android:layout_marginStart="@dimen/spacing_8"
|
||||
android:background="@drawable/bg_feed_community_image"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@drawable/ic_launcher_background" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="@dimen/spacing_8">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_following_news_rank"
|
||||
style="@style/Typography.Heading3"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/green_400"
|
||||
tools:text="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_following_news_rank_title"
|
||||
style="@style/Typography.Body4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_8"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
tools:text="최근 소식 제목" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_following_news_rank_count"
|
||||
style="@style/Typography.Body6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_8"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/gray_500"
|
||||
tools:text="999" />
|
||||
</LinearLayout>
|
||||
@@ -309,17 +309,15 @@
|
||||
<string name="home_recommendation_section_genre_creator_suffix">\u0020creators</string>
|
||||
<string name="home_recommendation_section_cheer_creators">Creators with recent cheers</string>
|
||||
<string name="home_recommendation_section_popular_community_posts">Popular community</string>
|
||||
<string name="screen_home_following_creators_title">Following creators</string>
|
||||
<string name="screen_home_following_on_air_title">On Air</string>
|
||||
<string name="screen_home_following_recent_chats_title">Recent chats</string>
|
||||
<string name="screen_home_following_monthly_schedules_title">Monthly schedule</string>
|
||||
<string name="screen_home_following_recent_news_title">Recent news</string>
|
||||
<string name="screen_home_following_on_air">On Air</string>
|
||||
<string name="screen_home_following_photo_content">Photo</string>
|
||||
<string name="screen_home_following_ranking_rank_format">No. %1$d</string>
|
||||
<string name="screen_home_following_creator_ranking_news_message">%1$s reached %2$s in this week\'s ranking!</string>
|
||||
<string name="screen_home_following_content_ranking_news_message">%1$s reached %2$s in this week\'s ranking!</string>
|
||||
<string name="screen_home_following_empty">No following updates yet.\nFollow creators you are interested in.</string>
|
||||
<string name="screen_home_following_error">Could not load following news.</string>
|
||||
<string name="home_recommendation_activity_live">Live</string>
|
||||
<string name="home_recommendation_activity_audio">Audio</string>
|
||||
<string name="home_recommendation_activity_community">Community</string>
|
||||
|
||||
@@ -309,17 +309,15 @@
|
||||
<string name="home_recommendation_section_genre_creator_suffix">のクリエイター</string>
|
||||
<string name="home_recommendation_section_cheer_creators">最近応援が多いクリエイター</string>
|
||||
<string name="home_recommendation_section_popular_community_posts">人気コミュニティ</string>
|
||||
<string name="screen_home_following_creators_title">フォロー中のクリエイター</string>
|
||||
<string name="screen_home_following_on_air_title">On Air</string>
|
||||
<string name="screen_home_following_recent_chats_title">最近のチャット</string>
|
||||
<string name="screen_home_following_monthly_schedules_title">今月のスケジュール</string>
|
||||
<string name="screen_home_following_recent_news_title">最近のお知らせ</string>
|
||||
<string name="screen_home_following_on_air">On Air</string>
|
||||
<string name="screen_home_following_photo_content">グラビア</string>
|
||||
<string name="screen_home_following_ranking_rank_format">%1$d位</string>
|
||||
<string name="screen_home_following_creator_ranking_news_message">%1$sさんが今週のランキング%2$sに入りました!</string>
|
||||
<string name="screen_home_following_content_ranking_news_message">%1$sが今週のランキング%2$sに入りました!</string>
|
||||
<string name="screen_home_following_empty">フォロー中のお知らせはまだありません。\n気になるクリエイターをフォローしてみましょう。</string>
|
||||
<string name="screen_home_following_error">フォロー中のお知らせを読み込めませんでした。</string>
|
||||
<string name="home_recommendation_activity_live">ライブ</string>
|
||||
<string name="home_recommendation_activity_audio">オーディオ</string>
|
||||
<string name="home_recommendation_activity_community">コミュニティ</string>
|
||||
|
||||
@@ -308,17 +308,15 @@
|
||||
<string name="home_recommendation_section_genre_creator_suffix">\u0020크리에이터</string>
|
||||
<string name="home_recommendation_section_cheer_creators">최근 응원이 많은 크리에이터</string>
|
||||
<string name="home_recommendation_section_popular_community_posts">인기 커뮤니티</string>
|
||||
<string name="screen_home_following_creators_title">팔로잉 크리에이터</string>
|
||||
<string name="screen_home_following_on_air_title">On Air</string>
|
||||
<string name="screen_home_following_recent_chats_title">최근 대화</string>
|
||||
<string name="screen_home_following_monthly_schedules_title">이달의 스케줄</string>
|
||||
<string name="screen_home_following_recent_news_title">최근 소식</string>
|
||||
<string name="screen_home_following_on_air">On Air</string>
|
||||
<string name="screen_home_following_photo_content">화보</string>
|
||||
<string name="screen_home_following_ranking_rank_format">%1$d위</string>
|
||||
<string name="screen_home_following_creator_ranking_news_message">%1$s님이 이번 주 랭킹 %2$s에 올랐어요!</string>
|
||||
<string name="screen_home_following_content_ranking_news_message">%1$s 콘텐츠가 이번 주 랭킹 %2$s에 올랐어요!</string>
|
||||
<string name="screen_home_following_empty">아직 팔로잉 소식이 없어요.\n관심 있는 크리에이터를 팔로우해 보세요.</string>
|
||||
<string name="screen_home_following_error">팔로잉 소식을 불러오지 못했습니다.</string>
|
||||
<string name="home_recommendation_activity_live">라이브</string>
|
||||
<string name="home_recommendation_activity_audio">오디오</string>
|
||||
<string name="home_recommendation_activity_community">커뮤니티</string>
|
||||
|
||||
Reference in New Issue
Block a user