mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-12-22 13:07:46 +00:00
Add amount to tx details screen
This commit is contained in:
parent
e60c38bd01
commit
05aedd6f53
3 changed files with 31 additions and 1 deletions
|
@ -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 -> {
|
||||
|
|
|
@ -86,6 +86,32 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/transaction_conf_label_textview"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/transaction_amount_label_textview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/amount_label"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/transaction_conf_textview"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/transaction_amount_textview"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tx_amount_no_prefix"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="middle"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/transaction_amount_label_textview"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/transaction_address_label_textview"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -96,7 +122,7 @@
|
|||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/transaction_conf_textview"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/transaction_amount_textview"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/transaction_address_textview"
|
||||
|
|
|
@ -81,6 +81,8 @@
|
|||
<string name="node_name_hint">My Monero Node</string>
|
||||
<string name="node_address_hint">127.0.0.1:18081</string>
|
||||
<string name="transaction">Transaction</string>
|
||||
<string name="amount_label">Amount</string>
|
||||
<string name="tx_amount_no_prefix">%1$s XMR</string>
|
||||
|
||||
<string name="wallet_proxy_address_hint">127.0.0.1</string>
|
||||
<string name="wallet_proxy_port_hint">9050</string>
|
||||
|
|
Loading…
Reference in a new issue