fix: 메인 홈 - 인기 크리에이터

- 팔로우/팔로잉 배경색 변경
This commit is contained in:
2025-07-21 19:52:23 +09:00
parent cfe9d3ab11
commit 9be1b86c5d
5 changed files with 35 additions and 8 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ android {
applicationId "kr.co.vividnext.sodalive" applicationId "kr.co.vividnext.sodalive"
minSdk 23 minSdk 23
targetSdk 34 targetSdk 34
versionCode 178 versionCode 179
versionName "1.40.0" versionName "1.40.0"
} }
@@ -5,11 +5,13 @@ import android.content.Context
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.core.graphics.toColorInt
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CircleCrop import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import kr.co.vividnext.sodalive.R import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.databinding.ItemHomeCreatorBinding import kr.co.vividnext.sodalive.databinding.ItemHomeCreatorBinding
import kr.co.vividnext.sodalive.explorer.GetExplorerSectionCreatorResponse import kr.co.vividnext.sodalive.explorer.GetExplorerSectionCreatorResponse
@@ -60,13 +62,20 @@ class CreatorRankingAdapter(
if (item.follow) { if (item.follow) {
binding.tvFollow.text = "팔로잉" binding.tvFollow.text = "팔로잉"
binding.tvFollow.setBackgroundResource(R.drawable.bg_round_corner_999_455a64)
binding.tvFollow.setTextColor(context.getColor(R.color.white))
} else { } else {
binding.tvFollow.text = "팔로우" binding.tvFollow.text = "팔로우"
binding.tvFollow.setBackgroundResource(R.drawable.bg_round_corner_999_white)
binding.tvFollow.setTextColor("#263238".toColorInt())
} }
binding.tvFollow.setOnClickListener { binding.tvFollow.setOnClickListener {
if (SharedPreferenceManager.token.isNotBlank()) {
item.follow = !item.follow item.follow = !item.follow
notifyItemChanged(index) notifyItemChanged(index)
}
onClickFollow(item.id, item.follow) onClickFollow(item.id, item.follow)
} }
@@ -407,7 +407,14 @@ class LiveFragment : BaseFragment<FragmentLiveBinding>(FragmentLiveBinding::infl
recyclerView.adapter = adapter recyclerView.adapter = adapter
viewModel.latestFinishedLiveListLiveData.observe(viewLifecycleOwner) { viewModel.latestFinishedLiveListLiveData.observe(viewLifecycleOwner) {
if (it.isNotEmpty()) {
adapter.addItems(it) adapter.addItems(it)
binding.llLatestFinishedLiveChannel.visibility = View.VISIBLE
binding.rvLatestFinishedLiveChannel.visibility = View.VISIBLE
} else {
binding.llLatestFinishedLiveChannel.visibility = View.GONE
binding.rvLatestFinishedLiveChannel.visibility = View.GONE
}
} }
} }
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#455A64" />
<corners android:radius="999dp" />
</shape>
+9 -4
View File
@@ -80,7 +80,8 @@
layout="@layout/layout_live_recommend_channel" layout="@layout/layout_live_recommend_channel"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="48dp" /> android:layout_marginBottom="48dp"
android:visibility="gone" />
<TextView <TextView
android:id="@+id/tv_community_post" android:id="@+id/tv_community_post"
@@ -91,7 +92,8 @@
android:fontFamily="@font/pretendard_bold" android:fontFamily="@font/pretendard_bold"
android:text="커뮤니티" android:text="커뮤니티"
android:textColor="@color/color_3bb9f1" android:textColor="@color/color_3bb9f1"
android:textSize="24sp" /> android:textSize="24sp"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_community_post" android:id="@+id/rv_community_post"
@@ -110,10 +112,12 @@
android:layout_marginBottom="48dp" /> android:layout_marginBottom="48dp" />
<LinearLayout <LinearLayout
android:id="@+id/ll_latest_finished_live_channel"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp" android:layout_marginHorizontal="24dp"
android:orientation="horizontal"> android:orientation="horizontal"
android:visibility="gone">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -139,7 +143,8 @@
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="48dp" android:layout_marginBottom="48dp"
android:clipToPadding="false" android:clipToPadding="false"
android:paddingHorizontal="24dp" /> android:paddingHorizontal="24dp"
android:visibility="gone" />
<LinearLayout <LinearLayout
android:id="@+id/ll_replay_live" android:id="@+id/ll_replay_live"