From: Damyan Ivanov Date: Sun, 10 Nov 2019 17:48:22 +0000 (+0200) Subject: debug++ X-Git-Tag: v0.11.0~84 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=e44eba70988ae0a19b14319fcb3d20459ecfd999;p=mobile-ledger.git debug++ --- 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 81487af6..d051fe00 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 @@ -171,7 +171,26 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder } }; accountCountObserver = count -> { - if (getAdapterPosition() == count) tvAmount.setImeOptions(EditorInfo.IME_ACTION_DONE); + final int adapterPosition = getAdapterPosition(); + final int layoutPosition = getLayoutPosition(); + Logger.debug("holder", + String.format(Locale.US, "count=%d; pos=%d, layoutPos=%d [%s]", count, + adapterPosition, layoutPosition, item.getType() + .toString() + .concat(item.getType() == + NewTransactionModel.ItemType.transactionRow + ? String.format(Locale.US, + "'%s'=%s", + item.getAccount() + .getAccountName(), + item.getAccount() + .isAmountSet() + ? String.format(Locale.US, + "%.2f", + item.getAccount() + .getAmount()) + : "unset") : ""))); + if (adapterPosition == count) tvAmount.setImeOptions(EditorInfo.IME_ACTION_DONE); else tvAmount.setImeOptions(EditorInfo.IME_ACTION_NEXT); }; }