From 0682c6b3d3f7cef22725f3db15916346fdc4529e Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 16 Apr 2020 13:37:45 -0300 Subject: [wallet] change main screen if there is only one currency If there is more than one currency, the screen shows a list of balances per currency like it used to. If there is only one currency, the main screen directly shows the list of transactions with the balance in the toolbar. --- wallet/src/main/java/net/taler/wallet/Utils.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'wallet/src/main/java/net/taler/wallet/Utils.kt') diff --git a/wallet/src/main/java/net/taler/wallet/Utils.kt b/wallet/src/main/java/net/taler/wallet/Utils.kt index ae8712f..b41a202 100644 --- a/wallet/src/main/java/net/taler/wallet/Utils.kt +++ b/wallet/src/main/java/net/taler/wallet/Utils.kt @@ -16,6 +16,17 @@ package net.taler.wallet +import android.app.Activity +import com.google.zxing.integration.android.IntentIntegrator + +fun scanQrCode(activity: Activity) { + IntentIntegrator(activity).apply { + setPrompt("") + setBeepEnabled(true) + setOrientationLocked(false) + }.initiateScan(listOf(IntentIntegrator.QR_CODE)) +} + fun cleanExchange(exchange: String) = exchange.let { if (it.startsWith("https://")) it.substring(8) else it }.trimEnd('/') -- cgit v1.2.3