]> git.ktnx.net Git - mobile-ledger.git/commitdiff
pop-up the date picked dialog as soon as the date field receives focus
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 9 Dec 2018 12:47:39 +0000 (12:47 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 9 Dec 2018 12:47:39 +0000 (12:47 +0000)
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");