From c0a8673e9f97fbeb565000fe85d2f1ce55f6e8c2 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 16 Sep 2020 10:21:33 -0300 Subject: Make apps work on API 21+ (except cashier that needs 23+) --- .../main/java/net/taler/wallet/transactions/TransactionAdapter.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'wallet/src/main/java/net/taler/wallet/transactions') diff --git a/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt b/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt index 936bbbd..5e492f5 100644 --- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt +++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt @@ -25,6 +25,7 @@ import android.view.View.VISIBLE import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView +import androidx.core.content.ContextCompat.getColor import androidx.recyclerview.selection.ItemDetailsLookup import androidx.recyclerview.selection.ItemKeyProvider import androidx.recyclerview.selection.SelectionTracker @@ -80,13 +81,11 @@ internal class TransactionAdapter( private val amount: TextView = v.findViewById(R.id.amount) private val pendingView: TextView = v.findViewById(R.id.pendingView) - private val selectableForeground = v.foreground private val amountColor = amount.currentTextColor - private val red = context.getColor(R.color.red) - private val green = context.getColor(R.color.green) + private val red = getColor(context, R.color.red) + private val green = getColor(context, R.color.green) fun bind(transaction: Transaction, selected: Boolean) { - v.foreground = selectableForeground v.setOnClickListener { listener.onTransactionClicked(transaction) } v.isActivated = selected if (transaction.error == null) { -- cgit v1.2.3