unneeded coloring
This commit is contained in:
parent
e8e2a50cad
commit
b1030ac8c1
|
@ -6,7 +6,6 @@ import android.graphics.Color
|
||||||
import android.graphics.drawable.GradientDrawable
|
import android.graphics.drawable.GradientDrawable
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.util.Log
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
|
@ -93,9 +92,14 @@ class ProductView: LinearLayout {
|
||||||
if (isProductSelected) {
|
if (isProductSelected) {
|
||||||
this.background = ContextCompat.getDrawable(context, R.drawable.outline_selected)
|
this.background = ContextCompat.getDrawable(context, R.drawable.outline_selected)
|
||||||
} else {
|
} else {
|
||||||
this.background = ContextCompat.getDrawable(context, R.drawable.outline)
|
if (product.id != 0) {
|
||||||
val color = evaluateColor()
|
val color = evaluateColor()
|
||||||
|
val outline = GradientDrawable()
|
||||||
|
this.background = outline
|
||||||
(this.background.current as GradientDrawable).setStroke(3, color)
|
(this.background.current as GradientDrawable).setStroke(3, color)
|
||||||
|
} else {
|
||||||
|
this.background = ContextCompat.getDrawable(context, R.drawable.outline)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue