focus away when removing the row with the focus
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 9 Dec 2018 17:52:32 +0000 (17:52 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 9 Dec 2018 17:52:32 +0000 (17:52 +0000)
app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java

index 53cbc905d62cad18d25aa3abc7e4c2a3958a2882..d6e2b8338b54c42425152b901ad152d49ac486ee 100644 (file)
@@ -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();