mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Improve display
This commit is contained in:
parent
04d73f262c
commit
071fb953f0
2 changed files with 8 additions and 3 deletions
|
|
@ -269,7 +269,7 @@ private fun AvatarEquipmentView(
|
|||
}
|
||||
.background(colorResource(id = R.color.window_background)),
|
||||
) {
|
||||
if (item.key.isNullOrBlank() || item.key == "0" || item.key?.endsWith("_0") == true) {
|
||||
if (item.key.isNullOrBlank() || item.key == "0" || item.key?.endsWith("_0") == true || item.key == "none") {
|
||||
Image(painterResource(R.drawable.empty_slot), contentDescription = null, contentScale = ContentScale.None, modifier = Modifier.size(68.dp))
|
||||
} else {
|
||||
PixelArtView(
|
||||
|
|
|
|||
|
|
@ -75,8 +75,13 @@ class ShopItemViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), Vi
|
|||
val isLimited = item.isLimited || item.availableUntil != null
|
||||
if (numberOwned > 0) {
|
||||
binding.itemDetailIndicator.text = numberOwned.toString()
|
||||
binding.itemDetailIndicator.background =
|
||||
AppCompatResources.getDrawable(context, R.drawable.pill_bg_gray)
|
||||
if (isLimited) {
|
||||
binding.itemDetailIndicator.background = AppCompatResources.getDrawable(context, R.drawable.pill_bg_purple_300)
|
||||
binding.itemDetailIndicator.setTextColor(ContextCompat.getColor(context, R.color.white))
|
||||
} else {
|
||||
binding.itemDetailIndicator.background = AppCompatResources.getDrawable(context, R.drawable.pill_bg_gray)
|
||||
binding.itemDetailIndicator.setTextColor(ContextCompat.getColor(context, R.color.text_quad))
|
||||
}
|
||||
binding.itemDetailIndicator.visibility = View.VISIBLE
|
||||
} else if (item.locked) {
|
||||
binding.itemDetailIndicator.background =
|
||||
|
|
|
|||
Loading…
Reference in a new issue