refs #5972 modify_ubicator
This commit is contained in:
parent
ea63ddc24d
commit
0d600e0d16
|
@ -7,7 +7,6 @@ import androidx.core.content.ContextCompat
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.ItemUbicationRowBinding
|
import es.verdnatura.databinding.ItemUbicationRowBinding
|
||||||
import es.verdnatura.domain.notNull
|
|
||||||
import es.verdnatura.presentation.common.OnMoreClickListener
|
import es.verdnatura.presentation.common.OnMoreClickListener
|
||||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||||
import es.verdnatura.presentation.common.OnVisibleClickListener
|
import es.verdnatura.presentation.common.OnVisibleClickListener
|
||||||
|
@ -88,23 +87,35 @@ class UbicadorAdapter(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isChecked!=null){
|
if (item.isChecked != null) {
|
||||||
|
|
||||||
when (item.isChecked!!.toInt()){
|
when (item.isChecked!!.toInt()) {
|
||||||
0 -> itemRowLayout.setBackgroundColor(
|
0 -> itemRowLayout.setBackgroundColor(
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
visibleText.context,
|
visibleText.context,
|
||||||
R.color.verdnatura_red_salix
|
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(
|
itemRowLayout.setBackgroundColor(
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
visibleText.context,
|
visibleText.context,
|
||||||
|
|
Loading…
Reference in New Issue