fix: 메인 홈 - 인기 크리에이터
- 팔로우/팔로잉 배경색 변경
This commit is contained in:
		@@ -5,11 +5,13 @@ import android.content.Context
 | 
			
		||||
import android.view.LayoutInflater
 | 
			
		||||
import android.view.View
 | 
			
		||||
import android.view.ViewGroup
 | 
			
		||||
import androidx.core.graphics.toColorInt
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView
 | 
			
		||||
import com.bumptech.glide.Glide
 | 
			
		||||
import com.bumptech.glide.load.resource.bitmap.CircleCrop
 | 
			
		||||
import com.bumptech.glide.request.RequestOptions
 | 
			
		||||
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.explorer.GetExplorerSectionCreatorResponse
 | 
			
		||||
 | 
			
		||||
@@ -60,13 +62,20 @@ class CreatorRankingAdapter(
 | 
			
		||||
 | 
			
		||||
            if (item.follow) {
 | 
			
		||||
                binding.tvFollow.text = "팔로잉"
 | 
			
		||||
                binding.tvFollow.setBackgroundResource(R.drawable.bg_round_corner_999_455a64)
 | 
			
		||||
                binding.tvFollow.setTextColor(context.getColor(R.color.white))
 | 
			
		||||
 | 
			
		||||
            } else {
 | 
			
		||||
                binding.tvFollow.text = "팔로우"
 | 
			
		||||
                binding.tvFollow.setBackgroundResource(R.drawable.bg_round_corner_999_white)
 | 
			
		||||
                binding.tvFollow.setTextColor("#263238".toColorInt())
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            binding.tvFollow.setOnClickListener {
 | 
			
		||||
                item.follow = !item.follow
 | 
			
		||||
                notifyItemChanged(index)
 | 
			
		||||
                if (SharedPreferenceManager.token.isNotBlank()) {
 | 
			
		||||
                    item.follow = !item.follow
 | 
			
		||||
                    notifyItemChanged(index)
 | 
			
		||||
                }
 | 
			
		||||
                onClickFollow(item.id, item.follow)
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -407,7 +407,14 @@ class LiveFragment : BaseFragment<FragmentLiveBinding>(FragmentLiveBinding::infl
 | 
			
		||||
        recyclerView.adapter = adapter
 | 
			
		||||
 | 
			
		||||
        viewModel.latestFinishedLiveListLiveData.observe(viewLifecycleOwner) {
 | 
			
		||||
            adapter.addItems(it)
 | 
			
		||||
            if (it.isNotEmpty()) {
 | 
			
		||||
                adapter.addItems(it)
 | 
			
		||||
                binding.llLatestFinishedLiveChannel.visibility = View.VISIBLE
 | 
			
		||||
                binding.rvLatestFinishedLiveChannel.visibility = View.VISIBLE
 | 
			
		||||
            } else {
 | 
			
		||||
                binding.llLatestFinishedLiveChannel.visibility = View.GONE
 | 
			
		||||
                binding.rvLatestFinishedLiveChannel.visibility = View.GONE
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								app/src/main/res/drawable/bg_round_corner_999_455a64.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/src/main/res/drawable/bg_round_corner_999_455a64.xml
									
									
									
									
									
										Normal file
									
								
							@@ -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>
 | 
			
		||||
@@ -80,7 +80,8 @@
 | 
			
		||||
                layout="@layout/layout_live_recommend_channel"
 | 
			
		||||
                android:layout_width="match_parent"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:layout_marginBottom="48dp" />
 | 
			
		||||
                android:layout_marginBottom="48dp"
 | 
			
		||||
                android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/tv_community_post"
 | 
			
		||||
@@ -91,7 +92,8 @@
 | 
			
		||||
                android:fontFamily="@font/pretendard_bold"
 | 
			
		||||
                android:text="커뮤니티"
 | 
			
		||||
                android:textColor="@color/color_3bb9f1"
 | 
			
		||||
                android:textSize="24sp" />
 | 
			
		||||
                android:textSize="24sp"
 | 
			
		||||
                android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
            <androidx.recyclerview.widget.RecyclerView
 | 
			
		||||
                android:id="@+id/rv_community_post"
 | 
			
		||||
@@ -110,10 +112,12 @@
 | 
			
		||||
                android:layout_marginBottom="48dp" />
 | 
			
		||||
 | 
			
		||||
            <LinearLayout
 | 
			
		||||
                android:id="@+id/ll_latest_finished_live_channel"
 | 
			
		||||
                android:layout_width="match_parent"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:layout_marginHorizontal="24dp"
 | 
			
		||||
                android:orientation="horizontal">
 | 
			
		||||
                android:orientation="horizontal"
 | 
			
		||||
                android:visibility="gone">
 | 
			
		||||
 | 
			
		||||
                <TextView
 | 
			
		||||
                    android:layout_width="wrap_content"
 | 
			
		||||
@@ -139,7 +143,8 @@
 | 
			
		||||
                android:layout_marginTop="16dp"
 | 
			
		||||
                android:layout_marginBottom="48dp"
 | 
			
		||||
                android:clipToPadding="false"
 | 
			
		||||
                android:paddingHorizontal="24dp" />
 | 
			
		||||
                android:paddingHorizontal="24dp"
 | 
			
		||||
                android:visibility="gone" />
 | 
			
		||||
 | 
			
		||||
            <LinearLayout
 | 
			
		||||
                android:id="@+id/ll_replay_live"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user