feat: 메인 홈
- UI 수정
This commit is contained in:
		@@ -49,7 +49,7 @@ class HomeContentAdapter(
 | 
			
		||||
            binding.ivContentCoverImage.load(item.coverImageUrl) {
 | 
			
		||||
                crossfade(true)
 | 
			
		||||
                placeholder(R.drawable.ic_place_holder)
 | 
			
		||||
                transformations(RoundedCornersTransformation(2.7f.dpToPx()))
 | 
			
		||||
                transformations(RoundedCornersTransformation(16f.dpToPx()))
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            binding.tvContentTitle.text = item.title
 | 
			
		||||
 
 | 
			
		||||
@@ -50,7 +50,7 @@ class HomeCurationAdapter(
 | 
			
		||||
 | 
			
		||||
                        val position = parent.getChildAdapterPosition(view)
 | 
			
		||||
 | 
			
		||||
                        if (position == 0 || position == 1) {
 | 
			
		||||
                        if (position == 0) {
 | 
			
		||||
                            outRect.left = 0f.dpToPx().toInt()
 | 
			
		||||
                        } else {
 | 
			
		||||
                            outRect.left = 8f.dpToPx().toInt()
 | 
			
		||||
 
 | 
			
		||||
@@ -464,14 +464,14 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
 | 
			
		||||
            .eventBannerSlider
 | 
			
		||||
            .layoutParams as LinearLayout.LayoutParams
 | 
			
		||||
 | 
			
		||||
        val pagerWidth = screenWidth.toDouble()
 | 
			
		||||
        val pagerHeight = (pagerWidth * 0.53).roundToInt()
 | 
			
		||||
        layoutParams.width = pagerWidth.roundToInt()
 | 
			
		||||
        val pagerWidth = screenWidth
 | 
			
		||||
        val pagerHeight = pagerWidth * 198 / 352
 | 
			
		||||
        layoutParams.width = pagerWidth
 | 
			
		||||
        layoutParams.height = pagerHeight
 | 
			
		||||
 | 
			
		||||
        contentBannerAdapter = AudioContentMainBannerAdapter(
 | 
			
		||||
            requireContext(),
 | 
			
		||||
            pagerWidth.roundToInt(),
 | 
			
		||||
            pagerWidth,
 | 
			
		||||
            pagerHeight
 | 
			
		||||
        ) {
 | 
			
		||||
            if (SharedPreferenceManager.token.isNotBlank()) {
 | 
			
		||||
@@ -535,14 +535,11 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
 | 
			
		||||
            .setIndicatorHeight(10f.dpToPx().toInt())
 | 
			
		||||
 | 
			
		||||
        viewModel.eventBannerListLiveData.observe(viewLifecycleOwner) {
 | 
			
		||||
            if (
 | 
			
		||||
                SharedPreferenceManager.token.isBlank() ||
 | 
			
		||||
                (contentBannerAdapter.itemCount <= 0 && it.isEmpty())
 | 
			
		||||
            ) {
 | 
			
		||||
                binding.llBanner.visibility = View.GONE
 | 
			
		||||
            } else {
 | 
			
		||||
            if (it.isNotEmpty()) {
 | 
			
		||||
                binding.llBanner.visibility = View.VISIBLE
 | 
			
		||||
                binding.eventBannerSlider.refreshData(it)
 | 
			
		||||
            } else {
 | 
			
		||||
                binding.llBanner.visibility = View.GONE
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@@ -622,7 +619,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
 | 
			
		||||
 | 
			
		||||
    private fun setupAudition() {
 | 
			
		||||
        val layoutParams = binding
 | 
			
		||||
            .eventBannerSlider
 | 
			
		||||
            .auditionSlider
 | 
			
		||||
            .layoutParams as LinearLayout.LayoutParams
 | 
			
		||||
 | 
			
		||||
        val pagerWidth = screenWidth.toDouble()
 | 
			
		||||
@@ -1012,7 +1009,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
 | 
			
		||||
 | 
			
		||||
                val position = parent.getChildAdapterPosition(view)
 | 
			
		||||
 | 
			
		||||
                if (position == 0 || position == 1) {
 | 
			
		||||
                if (position == 0) {
 | 
			
		||||
                    outRect.left = 0f.dpToPx().toInt()
 | 
			
		||||
                } else {
 | 
			
		||||
                    outRect.left = 8f.dpToPx().toInt()
 | 
			
		||||
 
 | 
			
		||||
@@ -177,7 +177,9 @@
 | 
			
		||||
                <com.zhpan.bannerview.BannerViewPager
 | 
			
		||||
                    android:id="@+id/event_banner_slider"
 | 
			
		||||
                    android:layout_width="match_parent"
 | 
			
		||||
                    android:layout_height="wrap_content" />
 | 
			
		||||
                    android:layout_height="wrap_content"
 | 
			
		||||
                    android:clipChildren="false"
 | 
			
		||||
                    android:clipToPadding="false" />
 | 
			
		||||
 | 
			
		||||
                <com.zhpan.indicator.IndicatorView
 | 
			
		||||
                    android:id="@+id/indicator_event_banner"
 | 
			
		||||
@@ -256,9 +258,9 @@
 | 
			
		||||
                    android:id="@+id/rv_series_day_of_week_day"
 | 
			
		||||
                    android:layout_width="match_parent"
 | 
			
		||||
                    android:layout_height="wrap_content"
 | 
			
		||||
                    android:nestedScrollingEnabled="false"
 | 
			
		||||
                    android:layout_marginTop="16dp"
 | 
			
		||||
                    android:clipToPadding="false"
 | 
			
		||||
                    android:nestedScrollingEnabled="false"
 | 
			
		||||
                    android:paddingHorizontal="24dp" />
 | 
			
		||||
 | 
			
		||||
                <androidx.recyclerview.widget.RecyclerView
 | 
			
		||||
 
 | 
			
		||||
@@ -34,6 +34,7 @@
 | 
			
		||||
            android:id="@+id/tv_title"
 | 
			
		||||
            android:layout_width="wrap_content"
 | 
			
		||||
            android:layout_height="wrap_content"
 | 
			
		||||
            android:ellipsize="end"
 | 
			
		||||
            android:fontFamily="@font/pretendard_regular"
 | 
			
		||||
            android:maxLines="1"
 | 
			
		||||
            android:textColor="@color/white"
 | 
			
		||||
 
 | 
			
		||||
@@ -91,7 +91,7 @@
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:ellipsize="end"
 | 
			
		||||
                android:fontFamily="@font/pretendard_bold"
 | 
			
		||||
                android:fontFamily="@font/pretendard_regular"
 | 
			
		||||
                android:maxLines="1"
 | 
			
		||||
                android:textColor="@color/white"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
@@ -155,7 +155,7 @@
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:ellipsize="end"
 | 
			
		||||
                android:fontFamily="@font/pretendard_bold"
 | 
			
		||||
                android:fontFamily="@font/pretendard_regular"
 | 
			
		||||
                android:maxLines="1"
 | 
			
		||||
                android:textColor="@color/white"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
@@ -219,7 +219,7 @@
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:ellipsize="end"
 | 
			
		||||
                android:fontFamily="@font/pretendard_bold"
 | 
			
		||||
                android:fontFamily="@font/pretendard_regular"
 | 
			
		||||
                android:maxLines="1"
 | 
			
		||||
                android:textColor="@color/white"
 | 
			
		||||
                android:textSize="18sp"
 | 
			
		||||
 
 | 
			
		||||
@@ -7,6 +7,7 @@
 | 
			
		||||
        android:id="@+id/iv_recommend_live"
 | 
			
		||||
        android:layout_width="match_parent"
 | 
			
		||||
        android:layout_height="wrap_content"
 | 
			
		||||
        android:scaleType="centerCrop"
 | 
			
		||||
        android:contentDescription="@null" />
 | 
			
		||||
        android:adjustViewBounds="true"
 | 
			
		||||
        android:contentDescription="@null"
 | 
			
		||||
        android:scaleType="centerCrop" />
 | 
			
		||||
</FrameLayout>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user