From 05aedd6f5378075fb85e852667dbb76fd3a8dc87 Mon Sep 17 00:00:00 2001 From: pokkst Date: Sat, 17 Sep 2022 14:57:17 -0500 Subject: [PATCH] Add amount to tx details screen --- .../transaction/TransactionFragment.java | 2 ++ .../main/res/layout/fragment_transaction.xml | 28 ++++++++++++++++++- app/src/main/res/values/strings.xml | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/m2049r/xmrwallet/fragment/transaction/TransactionFragment.java b/app/src/main/java/com/m2049r/xmrwallet/fragment/transaction/TransactionFragment.java index 1ec536f..6f1839f 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/fragment/transaction/TransactionFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/fragment/transaction/TransactionFragment.java @@ -94,11 +94,13 @@ public class TransactionFragment extends Fragment { TextView txAddressTextView = view.findViewById(R.id.transaction_address_textview); ImageButton copyTxAddressImageButton = view.findViewById(R.id.copy_txaddress_imagebutton); TextView txDateTextView = view.findViewById(R.id.transaction_date_textview); + TextView txAmountTextView = view.findViewById(R.id.transaction_amount_textview); mViewModel.transaction.observe(getViewLifecycleOwner(), transactionInfo -> { txHashTextView.setText(transactionInfo.hash); txConfTextView.setText(""+transactionInfo.confirmations); txDateTextView.setText(getDateTime(transactionInfo.timestamp)); + txAmountTextView.setText(getResources().getString(R.string.tx_amount_no_prefix, Helper.getDisplayAmount(transactionInfo.amount))); }); mViewModel.destination.observe(getViewLifecycleOwner(), s -> { diff --git a/app/src/main/res/layout/fragment_transaction.xml b/app/src/main/res/layout/fragment_transaction.xml index 847592f..deafa3f 100644 --- a/app/src/main/res/layout/fragment_transaction.xml +++ b/app/src/main/res/layout/fragment_transaction.xml @@ -86,6 +86,32 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/transaction_conf_label_textview"/> + + + + + app:layout_constraintTop_toBottomOf="@id/transaction_amount_textview"/> My Monero Node 127.0.0.1:18081 Transaction + Amount + %1$s XMR 127.0.0.1 9050