콘텐츠 리스트 아이템 - 사이즈, 간격 수정
This commit is contained in:
parent
91a2da9032
commit
1ec0d8540a
|
@ -90,7 +90,7 @@ class AudioContentNewAllActivity : BaseActivity<ActivityAudioContentNewAllBindin
|
|||
|
||||
private fun setupNewContent() {
|
||||
newContentAdapter = AudioContentNewAllAdapter(
|
||||
itemWidth = (screenWidth - 54f.dpToPx().toInt()) / 3,
|
||||
itemWidth = (screenWidth - 42f.dpToPx().toInt()) / 3,
|
||||
onClickItem = {
|
||||
startActivity(
|
||||
Intent(this, AudioContentDetailActivity::class.java).apply {
|
||||
|
@ -118,10 +118,10 @@ class AudioContentNewAllActivity : BaseActivity<ActivityAudioContentNewAllBindin
|
|||
) {
|
||||
super.getItemOffsets(outRect, view, parent, state)
|
||||
|
||||
outRect.top = 6.7f.dpToPx().toInt()
|
||||
outRect.bottom = 6.7f.dpToPx().toInt()
|
||||
outRect.left = 6.7f.dpToPx().toInt()
|
||||
outRect.right = 6.7f.dpToPx().toInt()
|
||||
outRect.top = 8f.dpToPx().toInt()
|
||||
outRect.bottom = 8f.dpToPx().toInt()
|
||||
outRect.left = 4f.dpToPx().toInt()
|
||||
outRect.right = 4f.dpToPx().toInt()
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import kr.co.vividnext.sodalive.R
|
|||
import kr.co.vividnext.sodalive.audio_content.main.GetAudioContentMainItem
|
||||
import kr.co.vividnext.sodalive.databinding.ItemAudioContentNewAllBinding
|
||||
import kr.co.vividnext.sodalive.extensions.dpToPx
|
||||
import kr.co.vividnext.sodalive.extensions.moneyFormat
|
||||
|
||||
class AudioContentNewAllAdapter(
|
||||
private val itemWidth: Int,
|
||||
|
@ -52,7 +53,7 @@ class AudioContentNewAllAdapter(
|
|||
|
||||
if (item.price > 0) {
|
||||
binding.ivCan.visibility = View.VISIBLE
|
||||
binding.tvCan.text = "${item.price}"
|
||||
binding.tvCan.text = item.price.moneyFormat()
|
||||
} else {
|
||||
binding.ivCan.visibility = View.GONE
|
||||
binding.tvCan.text = "무료"
|
||||
|
|
|
@ -56,7 +56,7 @@ class AudioContentAllByThemeActivity : BaseActivity<ActivityAudioContentAllByThe
|
|||
binding.toolbar.tvBack.setOnClickListener { finish() }
|
||||
|
||||
adapter = AudioContentNewAllAdapter(
|
||||
itemWidth = (screenWidth - 54f.dpToPx().toInt()) / 3,
|
||||
itemWidth = (screenWidth - 42f.dpToPx().toInt()) / 3,
|
||||
onClickItem = {
|
||||
startActivity(
|
||||
Intent(this, AudioContentDetailActivity::class.java).apply {
|
||||
|
@ -84,10 +84,10 @@ class AudioContentAllByThemeActivity : BaseActivity<ActivityAudioContentAllByThe
|
|||
) {
|
||||
super.getItemOffsets(outRect, view, parent, state)
|
||||
|
||||
outRect.top = 6.7f.dpToPx().toInt()
|
||||
outRect.bottom = 6.7f.dpToPx().toInt()
|
||||
outRect.left = 6.7f.dpToPx().toInt()
|
||||
outRect.right = 6.7f.dpToPx().toInt()
|
||||
outRect.top = 8f.dpToPx().toInt()
|
||||
outRect.bottom = 8f.dpToPx().toInt()
|
||||
outRect.left = 4f.dpToPx().toInt()
|
||||
outRect.right = 4f.dpToPx().toInt()
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ class AudioContentCurationActivity : BaseActivity<ActivityAudioContentCurationBi
|
|||
binding.toolbar.tvBack.setOnClickListener { finish() }
|
||||
|
||||
adapter = AudioContentNewAllAdapter(
|
||||
itemWidth = (screenWidth - 54f.dpToPx().toInt()) / 3,
|
||||
itemWidth = (screenWidth - 42f.dpToPx().toInt()) / 3,
|
||||
onClickItem = {
|
||||
startActivity(
|
||||
Intent(this, AudioContentDetailActivity::class.java).apply {
|
||||
|
@ -83,10 +83,10 @@ class AudioContentCurationActivity : BaseActivity<ActivityAudioContentCurationBi
|
|||
) {
|
||||
super.getItemOffsets(outRect, view, parent, state)
|
||||
|
||||
outRect.top = 6.7f.dpToPx().toInt()
|
||||
outRect.bottom = 6.7f.dpToPx().toInt()
|
||||
outRect.left = 6.7f.dpToPx().toInt()
|
||||
outRect.right = 6.7f.dpToPx().toInt()
|
||||
outRect.top = 8f.dpToPx().toInt()
|
||||
outRect.bottom = 8f.dpToPx().toInt()
|
||||
outRect.left = 4f.dpToPx().toInt()
|
||||
outRect.right = 4f.dpToPx().toInt()
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
android:layout_marginBottom="2.7dp"
|
||||
android:background="@drawable/bg_round_corner_10_b3333333"
|
||||
android:orientation="horizontal"
|
||||
android:padding="3dp"
|
||||
android:padding="4dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_audio_content_cover_image"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_audio_content_cover_image">
|
||||
|
@ -30,18 +30,18 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@null"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:src="@drawable/ic_card_can_gray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_can"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="8.3sp"
|
||||
android:textSize="8.5sp"
|
||||
tools:ignore="SmallSp"
|
||||
tools:text="300" />
|
||||
tools:text="100000" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -52,25 +52,17 @@
|
|||
android:background="@drawable/bg_round_corner_10_b3333333"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:padding="3dp"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_audio_content_cover_image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_audio_content_cover_image">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_card_time_small_gray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="8.3sp"
|
||||
android:textSize="8.5sp"
|
||||
tools:ignore="SmallSp"
|
||||
tools:text="00:00:30" />
|
||||
</LinearLayout>
|
||||
|
@ -82,7 +74,7 @@
|
|||
android:layout_marginTop="8dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:maxLines="1"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/color_d2d2d2"
|
||||
android:textSize="13.3sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_audio_content_cover_image"
|
||||
|
|
Loading…
Reference in New Issue