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()
|
||||
|
||||
Reference in New Issue
Block a user