]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java
pop-up the date picked dialog as soon as the date field receives focus
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / NewTransactionActivity.java
index ca1812008e53fecc06d9f588fcc42abbec058b09..70b5632136f7cfbaa9939cea81b5e66f6925f791 100644 (file)
@@ -64,6 +64,13 @@ public class NewTransactionActivity extends AppCompatActivity implements TaskCal
         setSupportActionBar(toolbar);
 
         text_date = findViewById(R.id.new_transaction_date);
+        text_date.setOnFocusChangeListener(new View.OnFocusChangeListener() {
+            @Override
+            public
+            void onFocusChange(View v, boolean hasFocus) {
+                if (hasFocus) pickTransactionDate(v);
+            }
+        });
         text_descr = findViewById(R.id.new_transaction_description);
         hook_autocompletion_adapter(text_descr, MobileLedgerDB.DESCRIPTION_HISTORY_TABLE, "description");