|
4 | 4 | import android.app.Activity; |
5 | 5 | import android.app.Application; |
6 | 6 | import android.content.Context; |
| 7 | +import android.content.res.ColorStateList; |
7 | 8 | import android.content.res.Resources; |
| 9 | +import android.graphics.Color; |
| 10 | +import android.graphics.ColorMatrix; |
| 11 | +import android.graphics.ColorMatrixColorFilter; |
8 | 12 | import android.text.Editable; |
9 | 13 | import android.text.InputFilter; |
10 | 14 | import android.text.TextWatcher; |
|
21 | 25 |
|
22 | 26 | import androidx.annotation.DrawableRes; |
23 | 27 | import androidx.appcompat.app.AlertDialog; |
| 28 | +import androidx.core.widget.TextViewCompat; |
24 | 29 | import androidx.fragment.app.FragmentActivity; |
25 | 30 | import androidx.recyclerview.widget.DefaultItemAnimator; |
26 | 31 | import androidx.recyclerview.widget.DiffUtil; |
@@ -619,13 +624,19 @@ public void bindTo(final ProductRow row, boolean hasAnyImages) { |
619 | 624 | boolean hasCoupon = row.item.getCoupon() != null; |
620 | 625 | boolean isAgeRestricted = false; |
621 | 626 |
|
| 627 | + redLabel.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#ff0000"))); |
| 628 | + |
622 | 629 | if (row.item.getProduct() != null) { |
623 | 630 | isAgeRestricted = row.item.getProduct().getSaleRestriction().isAgeRestriction(); |
624 | 631 | } |
625 | 632 |
|
626 | 633 | redLabel.setVisibility(hasCoupon || isAgeRestricted ? View.VISIBLE : View.GONE); |
627 | 634 |
|
628 | 635 | if (hasCoupon) { |
| 636 | + if (!row.item.isManualCouponApplied()) { |
| 637 | + redLabel.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#999999"))); |
| 638 | + } |
| 639 | + |
629 | 640 | redLabel.setText("%"); |
630 | 641 | } else { |
631 | 642 | long age = row.item.getProduct().getSaleRestriction().getValue(); |
|
0 commit comments