From a5c421e49b4c8f1a4bcf6bd1fd4e82247319fe23 Mon Sep 17 00:00:00 2001 From: Unam Kim Date: Fri, 13 Sep 2024 09:00:21 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"[FIX/#163]=20=ED=9D=94=EB=93=A4?= =?UTF-8?q?=EA=B8=B0=20=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=8F=99=EC=A0=81=EC=9C=BC=EB=A1=9C=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=ED=95=9C=20=EB=B7=B0=EC=97=90=20=ED=95=A0=EB=8B=B9=EB=90=9C=20?= =?UTF-8?q?=ED=85=8D=EC=8A=A4=ED=8A=B8=EA=B0=80=20=EC=98=81=EC=97=AD?= =?UTF-8?q?=EC=9D=84=20=EB=84=98=EC=B9=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../familiar/shaketopic/shake/InterestView.kt | 38 ++++++------------- .../signup/complete/CardCompleteFragment.kt | 2 +- app/src/main/res/layout/item_topic.xml | 2 +- 3 files changed, 13 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/familiar/shaketopic/shake/InterestView.kt b/app/src/main/java/com/teumteum/teumteum/presentation/familiar/shaketopic/shake/InterestView.kt index 96260a4a..41ab03e0 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/familiar/shaketopic/shake/InterestView.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/familiar/shaketopic/shake/InterestView.kt @@ -1,13 +1,9 @@ package com.teumteum.teumteum.presentation.familiar.shaketopic.shake import android.animation.ValueAnimator -import android.annotation.SuppressLint import android.content.Context import android.graphics.Canvas import android.graphics.Paint -import android.text.Layout -import android.text.StaticLayout -import android.text.TextPaint import android.util.AttributeSet import android.view.View import androidx.core.content.ContextCompat @@ -25,7 +21,6 @@ class InterestView( private val views = mutableListOf() - @SuppressLint("DrawAllocation") override fun onDraw(canvas: Canvas) { super.onDraw(canvas) views.forEach { view -> @@ -42,30 +37,19 @@ class InterestView( paint ) - // 텍스트 그리기 설정 - val textPaint = TextPaint().apply { - color = ContextCompat.getColor(context, com.teumteum.base.R.color.elevation_level01) - textSize = TransformUtils.dpToPx(16f).toFloat() - typeface = ResourcesCompat.getFont(context, com.teumteum.base.R.font.pretendard_semibold) - } - - // 텍스트 레이아웃 생성 - val textWidth = view.width - (radius * 2) // 텍스트 영역 너비 조정 - val staticLayout = StaticLayout.Builder.obtain(view.text, 0, view.text.length, textPaint, textWidth.toInt()) - .setAlignment(Layout.Alignment.ALIGN_CENTER) - .setLineSpacing(1f, 1f) // 줄 간격 설정 - .setIncludePad(false) - .build() - - canvas.save() - // 텍스트를 그리기 위한 위치 조정 - val textX = view.x + radius - val textY = view.y + (view.height - staticLayout.height) / 2f - canvas.translate(textX, textY) - staticLayout.draw(canvas) - canvas.restore() + // 텍스트 그리기 + paint.color = + ContextCompat.getColor(context, com.teumteum.base.R.color.elevation_level01) + paint.textSize = TransformUtils.dpToPx(16f).toFloat() + paint.typeface = + ResourcesCompat.getFont(context, com.teumteum.base.R.font.pretendard_semibold) + paint.textAlign = Paint.Align.CENTER + val textX = view.x + view.width / 2 + val textY = view.y + view.height / 2 - (paint.descent() + paint.ascent()) / 2 + canvas.drawText(view.text, textX, textY, paint) } } + fun addUserInterest(interestViewConfig: InterestViewConfig) { views.add(interestViewConfig) resolveCollisions() diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/signup/complete/CardCompleteFragment.kt b/app/src/main/java/com/teumteum/teumteum/presentation/signup/complete/CardCompleteFragment.kt index 6f730c53..3e1d0451 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/signup/complete/CardCompleteFragment.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/signup/complete/CardCompleteFragment.kt @@ -68,7 +68,7 @@ class CardCompleteFragment submitInterestList(interests) isModify = false setIsModifyDetail(false) - isModifyDetail = false +// isModifyDetail = false } } } diff --git a/app/src/main/res/layout/item_topic.xml b/app/src/main/res/layout/item_topic.xml index 1fc9f9f5..65be03b5 100644 --- a/app/src/main/res/layout/item_topic.xml +++ b/app/src/main/res/layout/item_topic.xml @@ -127,7 +127,7 @@ android:textAlignment="center" android:textColor="@color/graphic_pink" android:textFontWeight="900" - android:textSize="17sp" + android:textSize="24sp" android:visibility="invisible" app:layout_constraintBottom_toTopOf="@id/tv_balance_question_second" app:layout_constraintEnd_toEndOf="@id/iv_back_balance_background"