From 58206e7dc27c7b7aee008a7f1ac21b5a9e6658a9 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 17 Nov 2019 19:20:27 +0200 Subject: [PATCH] NT setData(): expand ? : to an if, always set hint --- .../ui/activity/NewTransactionItemHolder.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java index 1d323a5b..e515690a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemHolder.java @@ -368,8 +368,14 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder case transactionRow: LedgerTransactionAccount acc = item.getAccount(); tvAccount.setText(acc.getAccountName()); - tvAmount.setText( - acc.isAmountSet() ? String.format("%1.2f", acc.getAmount()) : ""); + if (acc.isAmountSet()) { + tvAmount.setText(String.format("%1.2f", acc.getAmount())); + } + else { + tvAmount.setText(""); +// tvAmount.setHint(R.string.zero_amount); + } + tvAmount.setHint(item.getAmountHint()); lHead.setVisibility(View.GONE); lAccount.setVisibility(View.VISIBLE); lPadding.setVisibility(View.GONE); -- 2.39.5