From 0d600e0d16f639414745b3392cc773bb272985e3 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Thu, 6 Jul 2023 08:03:04 +0200 Subject: [PATCH] refs #5972 modify_ubicator --- .../ubicador/adapter/UbicadorAdapter.kt | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/adapter/UbicadorAdapter.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/adapter/UbicadorAdapter.kt index b0d46994..f681633a 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/adapter/UbicadorAdapter.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/adapter/UbicadorAdapter.kt @@ -7,7 +7,6 @@ import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView import es.verdnatura.R import es.verdnatura.databinding.ItemUbicationRowBinding -import es.verdnatura.domain.notNull import es.verdnatura.presentation.common.OnMoreClickListener import es.verdnatura.presentation.common.OnPasillerosItemClickListener import es.verdnatura.presentation.common.OnVisibleClickListener @@ -88,23 +87,35 @@ class UbicadorAdapter( ) } - if (item.isChecked!=null){ - - when (item.isChecked!!.toInt()){ + if (item.isChecked != null) { + + when (item.isChecked!!.toInt()) { 0 -> itemRowLayout.setBackgroundColor( ContextCompat.getColor( visibleText.context, R.color.verdnatura_red_salix - )) - in 1..Int.MAX_VALUE -> itemRowLayout.setBackgroundColor( - ContextCompat.getColor( - visibleText.context, - R.color.verdnatura_dark_green_verdnatura - )) + ) + ) + in 1..Int.MAX_VALUE -> + if (item.visible == "0") { + itemRowLayout.setBackgroundColor( + ContextCompat.getColor( + visibleText.context, + R.color.verdnatura_dark_sky_blue + ) + ) + } else { + itemRowLayout.setBackgroundColor( + ContextCompat.getColor( + visibleText.context, + R.color.verdnatura_dark_green_verdnatura + ) + ) + } } - }else{ + } else { itemRowLayout.setBackgroundColor( ContextCompat.getColor( visibleText.context,