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