]> git.ktnx.net Git - mobile-ledger.git/commitdiff
reset_form: focus the description before removing extra rows potentially containing...
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 9 Dec 2018 13:31:36 +0000 (13:31 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 9 Dec 2018 13:31:36 +0000 (13:31 +0000)
app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java

index 853fd0a698b30c441bfe5838dd20f3419d0db3d8..754d57f42ed15174c7a69bd91b8328e1c24b3586 100644 (file)
@@ -403,6 +403,9 @@ public class NewTransactionActivity extends AppCompatActivity implements TaskCal
     private void reset_form() {
         text_date.setText("");
         text_descr.setText("");
+
+        text_descr.requestFocus();
+
         while(table.getChildCount() > 2) {
             table.removeViewAt(2);
         }
@@ -413,7 +416,5 @@ public class NewTransactionActivity extends AppCompatActivity implements TaskCal
             ((TextView)tr.getChildAt(0)).setText("");
             ((TextView)tr.getChildAt(1)).setText("");
         }
-
-        text_descr.requestFocus();
     }
 }