From b04a1d6a50727376977a86a968b5ad0621f5a6a2 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 9 Dec 2018 17:52:32 +0000 Subject: [PATCH] focus away when removing the row with the focus --- .../java/net/ktnx/mobileledger/NewTransactionActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java index 53cbc905..d6e2b833 100644 --- a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java @@ -179,6 +179,11 @@ public class NewTransactionActivity extends AppCompatActivity implements TaskCal prev_amt.setImeOptions(EditorInfo.IME_ACTION_NEXT); } + if (row.hasFocus()) { + if (next_acc != null) next_acc.requestFocus(); + else prev_amt.requestFocus(); + } + table.removeView(row); check_transaction_submittable(); // Toast.makeText(NewTransactionActivity.this, "LEFT", Toast.LENGTH_LONG).show(); -- 2.39.5