diff options
Diffstat (limited to 'wallet/src/main/res')
-rw-r--r-- | wallet/src/main/res/drawable/badge.xml | 26 | ||||
-rw-r--r-- | wallet/src/main/res/layout/list_item_balance.xml | 30 |
2 files changed, 47 insertions, 9 deletions
diff --git a/wallet/src/main/res/drawable/badge.xml b/wallet/src/main/res/drawable/badge.xml new file mode 100644 index 0000000..0b06ce5 --- /dev/null +++ b/wallet/src/main/res/drawable/badge.xml @@ -0,0 +1,26 @@ +<!-- + ~ This file is part of GNU Taler + ~ (C) 2020 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/> + --> + +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="?android:textColorSecondary" /> + <corners android:radius="8dp" /> + <padding + android:bottom="2dp" + android:left="8dp" + android:right="8dp" + android:top="2dp" /> +</shape>
\ No newline at end of file diff --git a/wallet/src/main/res/layout/list_item_balance.xml b/wallet/src/main/res/layout/list_item_balance.xml index a9e15df..475e7d6 100644 --- a/wallet/src/main/res/layout/list_item_balance.xml +++ b/wallet/src/main/res/layout/list_item_balance.xml @@ -23,12 +23,12 @@ android:padding="16dp"> <TextView - android:id="@+id/balance_amount" + android:id="@+id/balanceAmountView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="8dp" android:textSize="40sp" - app:layout_constraintEnd_toStartOf="@+id/balance_currency" + app:layout_constraintEnd_toStartOf="@+id/balanceCurrencyView" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintStart_toStartOf="parent" @@ -36,15 +36,16 @@ tools:text="100.50" /> <TextView - android:id="@+id/balance_currency" + android:id="@+id/balanceCurrencyView" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginEnd="8dp" android:textSize="20sp" - app:layout_constraintBottom_toBottomOf="@+id/balance_amount" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_bias="0.5" - app:layout_constraintStart_toEndOf="@+id/balance_amount" - app:layout_constraintTop_toTopOf="@+id/balance_amount" + app:layout_constrainedWidth="true" + app:layout_constraintBottom_toBottomOf="@+id/balanceAmountView" + app:layout_constraintEnd_toStartOf="@+id/pendingView" + app:layout_constraintStart_toEndOf="@+id/balanceAmountView" + app:layout_constraintTop_toTopOf="@+id/balanceAmountView" tools:text="TESTKUDOS" /> <TextView @@ -58,7 +59,7 @@ app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/balance_amount" + app:layout_constraintTop_toBottomOf="@+id/balanceAmountView" tools:text="+10 TESTKUDOS" tools:visibility="visible" /> @@ -75,4 +76,15 @@ app:layout_constraintTop_toTopOf="@+id/balanceInboundAmount" tools:visibility="visible" /> + <TextView + android:id="@+id/pendingView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/badge" + android:text="@string/transaction_pending" + android:textColor="?android:textColorPrimaryInverse" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + </androidx.constraintlayout.widget.ConstraintLayout> |