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.R
|
||||||
import es.verdnatura.databinding.ItemArticleRowFragmentBinding
|
import es.verdnatura.databinding.ItemArticleRowFragmentBinding
|
||||||
import es.verdnatura.domain.ConstAndValues.SACADOR
|
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.pasillero.model.PasillerosItemVO
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||||
|
|
||||||
|
@ -31,7 +36,7 @@ class SaleAdapter(
|
||||||
private var SaleAdapter: SaleAdapter? = null,
|
private var SaleAdapter: SaleAdapter? = null,
|
||||||
private var type: String? = null,
|
private var type: String? = null,
|
||||||
|
|
||||||
) : RecyclerView.Adapter<SaleAdapter.AjustesItemHolder>() {
|
) : RecyclerView.Adapter<SaleAdapter.AjustesItemHolder>() {
|
||||||
var context: Context? = null
|
var context: Context? = null
|
||||||
var position: Int = 0
|
var position: Int = 0
|
||||||
|
|
||||||
|
@ -350,15 +355,21 @@ class SaleAdapter(
|
||||||
itemArticleQuantityLine3.visibility = View.VISIBLE
|
itemArticleQuantityLine3.visibility = View.VISIBLE
|
||||||
if (type != SACADOR) {
|
if (type != SACADOR) {
|
||||||
|
|
||||||
if (sale.hasMistake) {
|
//Tarea 5998
|
||||||
val drawable = imageErrorMessage.drawable
|
imageErrorMessage.imageTintList = if (sale.hasMistake) {
|
||||||
imageErrorMessage.imageTintList = ColorStateList.valueOf(
|
ColorStateList.valueOf(
|
||||||
getColor(
|
getColor(
|
||||||
context!!, R.color.verdnatura_red_salix
|
context!!, R.color.verdnatura_red_salix
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
imageErrorMessage.setImageDrawable(drawable)
|
} else {
|
||||||
|
ColorStateList.valueOf(
|
||||||
|
getColor(
|
||||||
|
context!!, R.color.verdnatura_black
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
imageErrorMessage.visibility = View.VISIBLE
|
imageErrorMessage.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
imageErrorMessage.visibility = View.INVISIBLE
|
imageErrorMessage.visibility = View.INVISIBLE
|
||||||
|
@ -446,6 +457,7 @@ class SaleAdapter(
|
||||||
itemView.setBackgroundColor(Color.BLACK)
|
itemView.setBackgroundColor(Color.BLACK)
|
||||||
itemView.setBackgroundResource((R.drawable.border))
|
itemView.setBackgroundResource((R.drawable.border))
|
||||||
}
|
}
|
||||||
|
|
||||||
"VIOLETA" -> itemView.setBackgroundColor(0xFF4c2882.toInt())
|
"VIOLETA" -> itemView.setBackgroundColor(0xFF4c2882.toInt())
|
||||||
|
|
||||||
"GRIS" -> itemView.setBackgroundColor(Color.GRAY)
|
"GRIS" -> itemView.setBackgroundColor(Color.GRAY)
|
||||||
|
|
Loading…
Reference in New Issue