콘텐츠 메인 ASMR 탭
- 순위 제거
This commit is contained in:
		| @@ -49,7 +49,6 @@ class AudioContentMainTabAsmrFragment : BaseFragment<FragmentAudioContentMainTab | ||||
|     private lateinit var loadingDialog: LoadingDialog | ||||
|     private lateinit var contentBannerAdapter: AudioContentMainBannerAdapter | ||||
|     private lateinit var newContentAdapter: AudioContentMainContentAdapter | ||||
|     private lateinit var contentRankingAdapter: AudioContentMainRankingAdapter | ||||
|     private lateinit var curationAdapter: AudioContentMainContentCurationAdapter | ||||
|     private lateinit var contentRankCreatorAdapter: ContentRankCreatorAdapter | ||||
|     private lateinit var popularContentByCreatorAdapter: PopularContentByCreatorAdapter | ||||
| @@ -67,7 +66,6 @@ class AudioContentMainTabAsmrFragment : BaseFragment<FragmentAudioContentMainTab | ||||
|  | ||||
|         setupContentBanner() | ||||
|         setupNewContent() | ||||
|         setupContentRanking() | ||||
|         setupPopularContentCreator() | ||||
|         setupPopularContentByCreator() | ||||
|         setupEventBanner() | ||||
| @@ -227,52 +225,6 @@ class AudioContentMainTabAsmrFragment : BaseFragment<FragmentAudioContentMainTab | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @SuppressLint("SetTextI18n") | ||||
|     private fun setupContentRanking() { | ||||
|         contentRankingAdapter = AudioContentMainRankingAdapter( | ||||
|             width = (screenWidth * 0.66).toInt() | ||||
|         ) { | ||||
|             startActivity( | ||||
|                 Intent(requireContext(), AudioContentDetailActivity::class.java).apply { | ||||
|                     putExtra(Constants.EXTRA_AUDIO_CONTENT_ID, it) | ||||
|                 } | ||||
|             ) | ||||
|         } | ||||
|  | ||||
|         binding.rvContentRanking.layoutManager = GridLayoutManager( | ||||
|             context, | ||||
|             3, | ||||
|             GridLayoutManager.HORIZONTAL, | ||||
|             false | ||||
|         ) | ||||
|  | ||||
|         binding.rvContentRanking.addItemDecoration(object : RecyclerView.ItemDecoration() { | ||||
|             override fun getItemOffsets( | ||||
|                 outRect: Rect, | ||||
|                 view: View, | ||||
|                 parent: RecyclerView, | ||||
|                 state: RecyclerView.State | ||||
|             ) { | ||||
|                 super.getItemOffsets(outRect, view, parent, state) | ||||
|                 outRect.top = 13.3f.dpToPx().toInt() | ||||
|                 outRect.bottom = 13.3f.dpToPx().toInt() | ||||
|                 outRect.left = 13.3f.dpToPx().toInt() | ||||
|                 outRect.right = 13.3f.dpToPx().toInt() | ||||
|             } | ||||
|         }) | ||||
|  | ||||
|         binding.rvContentRanking.adapter = contentRankingAdapter | ||||
|  | ||||
|         viewModel.contentRankingLiveData.observe(viewLifecycleOwner) { | ||||
|             if (it.isNotEmpty()) { | ||||
|                 binding.llContentRanking.visibility = View.VISIBLE | ||||
|                 contentRankingAdapter.addItems(it) | ||||
|             } else { | ||||
|                 binding.llContentRanking.visibility = View.GONE | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     private fun setupEventBanner() { | ||||
|         val imageSliderLp = binding.eventBannerSlider.layoutParams | ||||
|         imageSliderLp.width = screenWidth | ||||
|   | ||||
| @@ -33,10 +33,6 @@ class AudioContentMainTabAsmrViewModel( | ||||
|     val newContentListLiveData: LiveData<List<GetAudioContentMainItem>> | ||||
|         get() = _newContentListLiveData | ||||
|  | ||||
|     private var _contentRankingLiveData = MutableLiveData<List<GetAudioContentRankingItem>>() | ||||
|     val contentRankingLiveData: LiveData<List<GetAudioContentRankingItem>> | ||||
|         get() = _contentRankingLiveData | ||||
|  | ||||
|     private val _contentCreatorListLiveData = MutableLiveData<List<ContentCreatorResponse>>() | ||||
|     val contentCreatorListLiveData: LiveData<List<ContentCreatorResponse>> | ||||
|         get() = _contentCreatorListLiveData | ||||
| @@ -67,7 +63,6 @@ class AudioContentMainTabAsmrViewModel( | ||||
|  | ||||
|                             _contentBannerLiveData.value = data.contentBannerList | ||||
|                             _newContentListLiveData.value = data.newAsmrContentList | ||||
|                             _contentRankingLiveData.value = data.rankAsmrContentList | ||||
|                             _contentCreatorListLiveData.value = data.creatorList | ||||
|                             _salesCountRankContentListLiveData.value = | ||||
|                                 data.salesCountRankContentList | ||||
|   | ||||
| @@ -15,8 +15,6 @@ data class GetContentMainTabAsmrResponse( | ||||
|     val contentBannerList: List<GetAudioContentBannerResponse>, | ||||
|     @SerializedName("newAsmrContentList") | ||||
|     val newAsmrContentList: List<GetAudioContentMainItem>, | ||||
|     @SerializedName("rankAsmrContentList") | ||||
|     val rankAsmrContentList: List<GetAudioContentRankingItem>, | ||||
|     @SerializedName("creatorList") | ||||
|     val creatorList: List<ContentCreatorResponse>, | ||||
|     @SerializedName("salesCountRankContentList") | ||||
|   | ||||
| @@ -63,32 +63,6 @@ | ||||
|                 android:paddingHorizontal="13.3dp" /> | ||||
|         </LinearLayout> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:id="@+id/ll_content_ranking" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginTop="30dp" | ||||
|             android:orientation="vertical" | ||||
|             android:visibility="gone"> | ||||
|  | ||||
|             <TextView | ||||
|                 android:layout_width="wrap_content" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_marginStart="13.3dp" | ||||
|                 android:fontFamily="@font/gmarket_sans_bold" | ||||
|                 android:text="인기 ASMR" | ||||
|                 android:textColor="@color/color_eeeeee" | ||||
|                 android:textSize="18.3sp" /> | ||||
|  | ||||
|             <androidx.recyclerview.widget.RecyclerView | ||||
|                 android:id="@+id/rv_content_ranking" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:layout_marginTop="13.3dp" | ||||
|                 android:clipToPadding="false" | ||||
|                 android:paddingHorizontal="6.7dp" /> | ||||
|         </LinearLayout> | ||||
|  | ||||
|         <LinearLayout | ||||
|             android:id="@+id/ll_creator_content_ranking" | ||||
|             android:layout_width="match_parent" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user