fix(widget): 랭킹 순위 영역 위치를 보정한다

This commit is contained in:
2026-06-09 15:13:01 +09:00
parent ea076a5ac7
commit 64fb55db55
4 changed files with 64 additions and 16 deletions

View File

@@ -125,7 +125,7 @@ class CreatorRankingCompactCardView @JvmOverloads constructor(
private fun positionMedium(size: CreatorRankingCardSize) {
val scale = size.widthPx / 185f
requireNotNull(rankText).layoutParams = LayoutParams((55 * scale).roundToInt(), (75 * scale).roundToInt())
requireNotNull(rankText).layoutParams = LayoutParams((56 * scale).roundToInt(), (70 * scale).roundToInt())
findViewById<View>(R.id.ll_creator_ranking_delta).layoutParams = LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT
@@ -145,17 +145,17 @@ class CreatorRankingCompactCardView @JvmOverloads constructor(
private fun positionSmall(size: CreatorRankingCardSize) {
val scale = size.widthPx / 122f
requireNotNull(rankText).layoutParams = LayoutParams(
(42 * scale).roundToInt(),
(56 * scale).roundToInt()
(52 * scale).roundToInt(),
(50 * scale).roundToInt()
).apply {
leftMargin = (8 * scale).roundToInt()
leftMargin = 0
}
findViewById<View>(R.id.ll_creator_ranking_delta).layoutParams = LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT
).apply {
leftMargin = (10 * scale).roundToInt()
topMargin = (49 * scale).roundToInt()
topMargin = (50 * scale).roundToInt()
}
requireNotNull(nameText).layoutParams = LayoutParams(
(102 * scale).roundToInt(),

View File

@@ -110,8 +110,12 @@ class CreatorRankingHorizontalCardView @JvmOverloads constructor(
ViewGroup.LayoutParams.WRAP_CONTENT
).apply {
leftMargin = (14 * scale).roundToInt()
topMargin = (14 * scale).roundToInt()
topMargin = (12 * scale).roundToInt()
}
requireNotNull(rankText).layoutParams = android.widget.LinearLayout.LayoutParams(
(48 * scale).roundToInt(),
(52 * scale).roundToInt()
)
requireNotNull(rankText).applyCreatorRankingRankGradient()
imageView().layoutParams = LayoutParams((80 * scale).roundToInt(), (80 * scale).roundToInt()).apply {
leftMargin = (77 * scale).roundToInt()

View File

@@ -112,7 +112,7 @@ class CreatorRankingLargeCardView @JvmOverloads constructor(
private fun positionViews(size: CreatorRankingCardSize) {
val scale = size.widthPx / FIGMA_SIZE.toFloat()
requireNotNull(rankText).layoutParams = LayoutParams((112 * scale).roundToInt(), (124 * scale).roundToInt()).apply {
requireNotNull(rankText).layoutParams = LayoutParams((86 * scale).roundToInt(), (116 * scale).roundToInt()).apply {
leftMargin = 0
topMargin = 0
}
@@ -129,7 +129,7 @@ class CreatorRankingLargeCardView @JvmOverloads constructor(
ViewGroup.LayoutParams.WRAP_CONTENT
).apply {
leftMargin = (20 * scale).roundToInt()
topMargin = (122 * scale).roundToInt()
topMargin = (116 * scale).roundToInt()
}
}