feat(chat-character): 캐릭터 신규 이미지 표시 UI 추가

This commit is contained in:
2025-11-13 23:02:24 +09:00
parent 0cfa5f8a32
commit 9b3d672e78
7 changed files with 83 additions and 9 deletions

View File

@@ -11,5 +11,6 @@ data class Character(
@SerializedName("characterId") val characterId: Long,
@SerializedName("name") val name: String,
@SerializedName("description") val description: String,
@SerializedName("imageUrl") val imageUrl: String
@SerializedName("imageUrl") val imageUrl: String,
@SerializedName("isNew") val isNew: Boolean
) : Parcelable

View File

@@ -49,6 +49,12 @@ class CharacterAdapter(
binding.tvRanking.visibility = View.GONE
}
binding.tvNew.visibility = if (character.isNew) {
View.VISIBLE
} else {
View.GONE
}
binding.ivCharacter.load(character.imageUrl) {
crossfade(true)
placeholder(R.drawable.ic_logo_service_center)

View File

@@ -2,6 +2,7 @@ package kr.co.vividnext.sodalive.chat.character.newcharacters
import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import coil.load
@@ -26,6 +27,11 @@ class NewCharactersAllAdapter(
placeholder(R.drawable.ic_logo_service_center)
transformations(RoundedCornersTransformation(16f.dpToPx()))
}
binding.tvNew.visibility = if (item.isNew) {
View.VISIBLE
} else {
View.GONE
}
binding.root.setOnClickListener { onClick(item.characterId) }
}
}

View File

@@ -2,6 +2,7 @@ package kr.co.vividnext.sodalive.chat.original.detail
import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import coil.load
@@ -27,6 +28,11 @@ class OriginalWorkDetailAdapter(
placeholder(R.drawable.ic_logo_service_center)
transformations(RoundedCornersTransformation(16f.dpToPx()))
}
binding.tvNew.visibility = if (item.isNew) {
View.VISIBLE
} else {
View.GONE
}
binding.root.setOnClickListener { onClickCharacter(item.characterId) }
}
}