]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionAccountRowItemHolder.java
focus amount when account is selected
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / new_transaction / NewTransactionAccountRowItemHolder.java
index 04291c8dfb9e75c086650ef35d52046fd4390fb7..8f1c51dd9ae24e9a922747a5e5536a09a6ab0b65 100644 (file)
@@ -98,7 +98,7 @@ class NewTransactionAccountRowItemHolder extends NewTransactionItemViewHolder {
                             boolean wasSyncingData = syncingData;
                             syncingData = true;
                             try {
-                                // FIXME this needs to reach the model somehow
+                                // there is a listener that will propagate the change to the model
                                 b.accountRowAccAmounts.setText(newText);
                             }
                             finally {
@@ -127,6 +127,9 @@ class NewTransactionAccountRowItemHolder extends NewTransactionItemViewHolder {
         b.accountRowAccName.setAdapter(new AccountWithAmountsAutocompleteAdapter(b.getRoot()
                                                                                   .getContext(),
                 mProfile));
+        b.accountRowAccName.setOnItemClickListener((parent, view, position, id) -> {
+            adapter.noteFocusIsOnAmount(position);
+        });
 
         final TextWatcher tw = new TextWatcher() {
             @Override