summaryrefslogtreecommitdiff
path: root/wallet/src/main/java/net/taler/wallet/transactions
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-09-16 10:21:33 -0300
committerTorsten Grote <t@grobox.de>2020-09-16 10:37:37 -0300
commitc0a8673e9f97fbeb565000fe85d2f1ce55f6e8c2 (patch)
treeafeef27bf7da0683560fb61f887c87e0be410dbc /wallet/src/main/java/net/taler/wallet/transactions
parent85c2be5713eac244ffbe7a024ed2aa08b9816388 (diff)
downloadtaler-android-c0a8673e9f97fbeb565000fe85d2f1ce55f6e8c2.tar.gz
taler-android-c0a8673e9f97fbeb565000fe85d2f1ce55f6e8c2.tar.bz2
taler-android-c0a8673e9f97fbeb565000fe85d2f1ce55f6e8c2.zip
Make apps work on API 21+ (except cashier that needs 23+)
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/transactions')
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt7
1 files changed, 3 insertions, 4 deletions
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) {