From: Damyan Ivanov Date: Sun, 9 Dec 2018 17:52:32 +0000 (+0000) Subject: focus away when removing the row with the focus X-Git-Tag: v0.3~259 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=b04a1d6a50727376977a86a968b5ad0621f5a6a2;p=mobile-ledger.git focus away when removing the row with the focus --- 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();