taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit b1a2e85f2d93c6a04976391c27223203b47fb874
parent a7950cb0f51f2b9b34c38bd1bfa14ee4391ab37d
Author: Iván Ávalos <avalos@disroot.org>
Date:   Wed, 24 Jul 2024 11:17:53 -0600

[wallet] DD53: unify icons with iOS

Diffstat:
Mwallet/src/main/java/net/taler/wallet/transactions/Transactions.kt | 17++++++++---------
Awallet/src/main/res/drawable/transaction_deposit.xml | 29+++++++++++++++++++++++++++++
Awallet/src/main/res/drawable/transaction_dummy.xml | 29+++++++++++++++++++++++++++++
Mwallet/src/main/res/drawable/transaction_loss.xml | 17++++++++++-------
Awallet/src/main/res/drawable/transaction_p2p_incoming.xml | 30++++++++++++++++++++++++++++++
Awallet/src/main/res/drawable/transaction_p2p_outgoing.xml | 30++++++++++++++++++++++++++++++
Awallet/src/main/res/drawable/transaction_payment.xml | 27+++++++++++++++++++++++++++
Mwallet/src/main/res/drawable/transaction_refresh.xml | 18+++++++++---------
Mwallet/src/main/res/drawable/transaction_refund.xml | 18+++++++++++-------
Mwallet/src/main/res/drawable/transaction_withdrawal.xml | 17++++++++++-------
10 files changed, 193 insertions(+), 39 deletions(-)

diff --git a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt @@ -43,7 +43,6 @@ import net.taler.wallet.TAG import net.taler.wallet.backend.TalerErrorCode import net.taler.wallet.backend.TalerErrorInfo import net.taler.common.CurrencySpecification -import net.taler.wallet.cleanExchange import net.taler.wallet.refund.RefundPaymentInfo import net.taler.wallet.transactions.TransactionMajorState.None import net.taler.wallet.transactions.TransactionMajorState.Pending @@ -170,7 +169,7 @@ class TransactionWithdrawal( @Transient override val amountType = AmountType.Positive - override fun getTitle(context: Context) = cleanExchange(exchangeBaseUrl) + override fun getTitle(context: Context) = context.getString(R.string.withdraw_title) override val generalTitleRes = R.string.withdraw_title val confirmed: Boolean get() = txState.major != Pending && ( @@ -309,7 +308,7 @@ class TransactionPayment( override val amountEffective: Amount, val posConfirmation: String? = null, ) : Transaction() { - override val icon = R.drawable.ic_cash_usd_outline + override val icon = R.drawable.transaction_payment override val detailPageNav = R.id.action_nav_transactions_detail_payment @Transient @@ -396,7 +395,7 @@ class TransactionDeposit( val targetPaytoUri: String, val depositGroupId: String, ) : Transaction() { - override val icon = R.drawable.ic_cash_usd_outline + override val icon = R.drawable.transaction_deposit override val detailPageNav = R.id.action_nav_transactions_detail_deposit @Transient @@ -433,7 +432,7 @@ class TransactionPeerPullDebit( override val amountEffective: Amount, val info: PeerInfoShort, ) : Transaction() { - override val icon = R.drawable.ic_cash_usd_outline + override val icon = R.drawable.transaction_p2p_outgoing override val detailPageNav = R.id.nav_transactions_detail_peer @Transient @@ -463,7 +462,7 @@ class TransactionPeerPullCredit( val talerUri: String, // val completed: Boolean, maybe ) : Transaction() { - override val icon = R.drawable.transaction_withdrawal + override val icon = R.drawable.transaction_p2p_incoming override val detailPageNav = R.id.nav_transactions_detail_peer override val amountType get() = AmountType.Positive @@ -492,7 +491,7 @@ class TransactionPeerPushDebit( val talerUri: String? = null, // val completed: Boolean, definitely ) : Transaction() { - override val icon = R.drawable.ic_cash_usd_outline + override val icon = R.drawable.transaction_p2p_outgoing override val detailPageNav = R.id.nav_transactions_detail_peer @Transient @@ -520,7 +519,7 @@ class TransactionPeerPushCredit( override val amountEffective: Amount, val info: PeerInfoShort, ) : Transaction() { - override val icon = R.drawable.transaction_withdrawal + override val icon = R.drawable.transaction_p2p_incoming override val detailPageNav = R.id.nav_transactions_detail_peer @Transient @@ -585,7 +584,7 @@ class DummyTransaction( override val txActions: List<TransactionAction> = emptyList() override val amountRaw: Amount = Amount.zero("TESTKUDOS") override val amountEffective: Amount = Amount.zero("TESTKUDOS") - override val icon: Int = R.drawable.ic_bug_report + override val icon: Int = R.drawable.transaction_dummy override val detailPageNav: Int = R.id.nav_transactions_detail_dummy override val amountType: AmountType = AmountType.Neutral override val generalTitleRes: Int = R.string.transaction_dummy_title diff --git a/wallet/src/main/res/drawable/transaction_deposit.xml b/wallet/src/main/res/drawable/transaction_deposit.xml @@ -0,0 +1,29 @@ +<!-- + ~ This file is part of GNU Taler + ~ (C) 2024 Taler Systems S.A. + ~ + ~ GNU Taler is free software; you can redistribute it and/or modify it under the + ~ terms of the GNU General Public License as published by the Free Software + ~ Foundation; either version 3, or (at your option) any later version. + ~ + ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License along with + ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + --> + +<vector + xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:tint="?attr/colorControlNormal" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp"> + + <path + android:fillColor="#FF000000" + android:pathData="M4,12l1.41,1.41L11,7.83V20h2V7.83l5.58,5.59L20,12l-8,-8 -8,8z"/> + +</vector> diff --git a/wallet/src/main/res/drawable/transaction_dummy.xml b/wallet/src/main/res/drawable/transaction_dummy.xml @@ -0,0 +1,29 @@ +<!-- + ~ This file is part of GNU Taler + ~ (C) 2024 Taler Systems S.A. + ~ + ~ GNU Taler is free software; you can redistribute it and/or modify it under the + ~ terms of the GNU General Public License as published by the Free Software + ~ Foundation; either version 3, or (at your option) any later version. + ~ + ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License along with + ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + --> + +<vector + xmlns:android="http://schemas.android.com/apk/res/android" + android:tint="?attr/colorControlNormal" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp"> + + <path + android:fillColor="#FF000000" + android:pathData="M12,2C6.47,2 2,6.47 2,12c0,5.53 4.47,10 10,10s10,-4.47 10,-10C22,6.47 17.53,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8c0,-4.42 3.58,-8 8,-8s8,3.58 8,8C20,16.42 16.42,20 12,20z"/> + +</vector> diff --git a/wallet/src/main/res/drawable/transaction_loss.xml b/wallet/src/main/res/drawable/transaction_loss.xml @@ -14,13 +14,16 @@ ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" +<vector + xmlns:android="http://schemas.android.com/apk/res/android" android:tint="?attr/colorControlNormal" + android:height="24dp" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24"> - <path - android:fillColor="#FF000000" - android:pathData="M17.12,9.88C16.56,9.32 15.8,9 15,9S13.44,9.32 12.88,9.88C12.32,10.44 12,11.2 12,12S12.32,13.56 12.88,14.12 14.2,15 15,15 16.56,14.68 17.12,14.12 18,12.8 18,12 17.68,10.44 17.12,9.88M7,6V18H23V6H7M21,14C20.47,14 19.96,14.21 19.59,14.59C19.21,14.96 19,15.47 19,16H11C11,15.47 10.79,14.96 10.41,14.59C10.04,14.21 9.53,14 9,14V10C9.53,10 10.04,9.79 10.41,9.41C10.79,9.04 11,8.53 11,8H19C19,8.53 19.21,9.04 19.59,9.41C19.96,9.79 20.47,10 21,10V14M5,8H3C2.45,8 2,7.55 2,7C2,6.45 2.45,6 3,6H5V8M5,13H2C1.45,13 1,12.55 1,12C1,11.45 1.45,11 2,11H5V13M5,18H1C0.448,18 0,17.55 0,17C0,16.45 0.448,16 1,16H5V18Z"/> + android:width="24dp"> + + <path + android:fillColor="#FF000000" + android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z"/> + </vector> diff --git a/wallet/src/main/res/drawable/transaction_p2p_incoming.xml b/wallet/src/main/res/drawable/transaction_p2p_incoming.xml @@ -0,0 +1,30 @@ +<!-- + ~ This file is part of GNU Taler + ~ (C) 2024 Taler Systems S.A. + ~ + ~ GNU Taler is free software; you can redistribute it and/or modify it under the + ~ terms of the GNU General Public License as published by the Free Software + ~ Foundation; either version 3, or (at your option) any later version. + ~ + ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License along with + ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + --> + +<vector + xmlns:android="http://schemas.android.com/apk/res/android" + android:tint="?attr/colorControlNormal" + android:autoMirrored="false" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp"> + + <path + android:fillColor="#FF000000" + android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/> + +</vector> diff --git a/wallet/src/main/res/drawable/transaction_p2p_outgoing.xml b/wallet/src/main/res/drawable/transaction_p2p_outgoing.xml @@ -0,0 +1,30 @@ +<!-- + ~ This file is part of GNU Taler + ~ (C) 2024 Taler Systems S.A. + ~ + ~ GNU Taler is free software; you can redistribute it and/or modify it under the + ~ terms of the GNU General Public License as published by the Free Software + ~ Foundation; either version 3, or (at your option) any later version. + ~ + ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License along with + ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + --> + +<vector + xmlns:android="http://schemas.android.com/apk/res/android" + android:tint="?attr/colorControlNormal" + android:autoMirrored="false" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24" + android:width="24dp"> + + <path + android:fillColor="#FF000000" + android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z"/> + +</vector> diff --git a/wallet/src/main/res/drawable/transaction_payment.xml b/wallet/src/main/res/drawable/transaction_payment.xml @@ -0,0 +1,27 @@ +<!-- + ~ This file is part of GNU Taler + ~ (C) 2024 Taler Systems S.A. + ~ + ~ GNU Taler is free software; you can redistribute it and/or modify it under the + ~ terms of the GNU General Public License as published by the Free Software + ~ Foundation; either version 3, or (at your option) any later version. + ~ + ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License along with + ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:tint="?attr/colorControlNormal" + android:autoMirrored="false" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M14,9V5l7,7 -7,7V14.9C9,14.9 5.5,16.5 3,20 4,15 7,10 14,9Z" + android:fillColor="#FF000000"/> +</vector> diff --git a/wallet/src/main/res/drawable/transaction_refresh.xml b/wallet/src/main/res/drawable/transaction_refresh.xml @@ -1,6 +1,6 @@ <!-- ~ This file is part of GNU Taler - ~ (C) 2020 Taler Systems S.A. + ~ (C) 2024 Taler Systems S.A. ~ ~ GNU Taler is free software; you can redistribute it and/or modify it under the ~ terms of the GNU General Public License as published by the Free Software @@ -14,16 +14,16 @@ ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" +<vector + xmlns:android="http://schemas.android.com/apk/res/android" android:tint="?attr/colorControlNormal" + android:height="24dp" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24"> - <path - android:fillColor="#FF000000" - android:pathData="M14.97,11.62C14.86,10.28 13.58,8.97 12,9c-1.7,0.04 -3,1.3 -3,3 0,1.7 1.3,2.94 3,3 0.39,0 0.77,-0.08 1.14,-0.23 0.27,-1.1 0.72,-2.14 1.83,-3.15M13,16H7C7,14.9 6.1,14 5,14V10C6.1,10 7,9.1 7,8h10c0,1.1 0.9,2 2,2v0.05c0.67,0.01 1.34,0.13 2,0.35V6H3V18H13.32C13.1,17.33 13,16.66 13,16Z" /> + android:width="24dp"> + <path android:fillColor="#FF000000" - android:pathData="M19,12 L16.75,14.25 19,16.5V15c1.38,0 2.5,1.12 2.5,2.5 0,0.4 -0.09,0.78 -0.26,1.12l1.09,1.09C22.75,19.08 23,18.32 23,17.5c0,-2.21 -1.79,-4 -4,-4V12m-3.33,3.29C15.25,15.92 15,16.68 15,17.5c0,2.21 1.79,4 4,4V23L21.25,20.75 19,18.5V20c-1.38,0 -2.5,-1.12 -2.5,-2.5 0,-0.4 0.09,-0.78 0.26,-1.12z" /> + android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"/> + </vector> diff --git a/wallet/src/main/res/drawable/transaction_refund.xml b/wallet/src/main/res/drawable/transaction_refund.xml @@ -1,6 +1,6 @@ <!-- ~ This file is part of GNU Taler - ~ (C) 2020 Taler Systems S.A. + ~ (C) 2024 Taler Systems S.A. ~ ~ GNU Taler is free software; you can redistribute it and/or modify it under the ~ terms of the GNU General Public License as published by the Free Software @@ -14,13 +14,17 @@ ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" +<vector + xmlns:android="http://schemas.android.com/apk/res/android" android:tint="?attr/colorControlNormal" + android:autoMirrored="false" + android:height="24dp" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24"> + android:width="24dp"> + <path - android:fillColor="#000" - android:pathData="M3,11H21V23H3V11M12,15A2,2 0 0,1 14,17A2,2 0 0,1 12,19A2,2 0 0,1 10,17A2,2 0 0,1 12,15M7,13A2,2 0 0,1 5,15V19A2,2 0 0,1 7,21H17A2,2 0 0,1 19,19V15A2,2 0 0,1 17,13H7M17,5V10H15.5V6.5H9.88L12.3,8.93L11.24,10L7,5.75L11.24,1.5L12.3,2.57L9.88,5H17Z" /> + android:fillColor="#FF000000" + android:pathData="M10,9V5l-7,7 7,7v-4.1c5,0 8.5,1.6 11,5.1 -1,-5 -4,-10 -11,-11z"/> + </vector> diff --git a/wallet/src/main/res/drawable/transaction_withdrawal.xml b/wallet/src/main/res/drawable/transaction_withdrawal.xml @@ -1,6 +1,6 @@ <!-- ~ This file is part of GNU Taler - ~ (C) 2020 Taler Systems S.A. + ~ (C) 2024 Taler Systems S.A. ~ ~ GNU Taler is free software; you can redistribute it and/or modify it under the ~ terms of the GNU General Public License as published by the Free Software @@ -14,13 +14,16 @@ ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" +<vector + xmlns:android="http://schemas.android.com/apk/res/android" android:tint="?attr/colorControlNormal" + android:height="24dp" + android:viewportHeight="24" android:viewportWidth="24" - android:viewportHeight="24"> + android:width="24dp"> + <path - android:fillColor="#000" - android:pathData="M3 0V3H0V5H3V8H5V5H8V3H5V0H3M9 3V6H6V9H3V19C3 20.1 3.89 21 5 21H19C20.11 21 21 20.11 21 19V18H12C10.9 18 10 17.11 10 16V8C10 6.9 10.89 6 12 6H21V5C21 3.9 20.11 3 19 3H9M12 8V16H22V8H12M16 10.5C16.83 10.5 17.5 11.17 17.5 12C17.5 12.83 16.83 13.5 16 13.5C15.17 13.5 14.5 12.83 14.5 12C14.5 11.17 15.17 10.5 16 10.5Z" /> + android:fillColor="#FF000000" + android:pathData="M20,12l-1.41,-1.41L13,16.17V4h-2v12.17l-5.58,-5.59L4,12l8,8 8,-8z"/> + </vector>