feat(chat-character): 캐릭터 신규 이미지 표시 UI 추가
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user