refs #5998 change adapter
This commit is contained in:
parent
6e6234a0b6
commit
27423f3211
|
@ -15,7 +15,12 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.ItemArticleRowFragmentBinding
|
||||
import es.verdnatura.domain.ConstAndValues.SACADOR
|
||||
import es.verdnatura.presentation.common.*
|
||||
import es.verdnatura.presentation.common.OnMistakeClickListener
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.common.OnQuantityClickListener
|
||||
import es.verdnatura.presentation.common.OnSaleClickListener
|
||||
import es.verdnatura.presentation.common.OnTicketClickListener
|
||||
import es.verdnatura.presentation.common.onPackingClickListener
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||
|
||||
|
@ -350,15 +355,21 @@ class SaleAdapter(
|
|||
itemArticleQuantityLine3.visibility = View.VISIBLE
|
||||
if (type != SACADOR) {
|
||||
|
||||
if (sale.hasMistake) {
|
||||
val drawable = imageErrorMessage.drawable
|
||||
imageErrorMessage.imageTintList = ColorStateList.valueOf(
|
||||
//Tarea 5998
|
||||
imageErrorMessage.imageTintList = if (sale.hasMistake) {
|
||||
ColorStateList.valueOf(
|
||||
getColor(
|
||||
context!!, R.color.verdnatura_red_salix
|
||||
)
|
||||
)
|
||||
imageErrorMessage.setImageDrawable(drawable)
|
||||
} else {
|
||||
ColorStateList.valueOf(
|
||||
getColor(
|
||||
context!!, R.color.verdnatura_black
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
imageErrorMessage.visibility = View.VISIBLE
|
||||
} else {
|
||||
imageErrorMessage.visibility = View.INVISIBLE
|
||||
|
@ -446,6 +457,7 @@ class SaleAdapter(
|
|||
itemView.setBackgroundColor(Color.BLACK)
|
||||
itemView.setBackgroundResource((R.drawable.border))
|
||||
}
|
||||
|
||||
"VIOLETA" -> itemView.setBackgroundColor(0xFF4c2882.toInt())
|
||||
|
||||
"GRIS" -> itemView.setBackgroundColor(Color.GRAY)
|
||||
|
|
Loading…
Reference in New Issue