From 5a75a6d1ffb0c52d5aadca78aa2d6ee992bfbc84 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 9 Dec 2018 12:47:39 +0000 Subject: [PATCH] pop-up the date picked dialog as soon as the date field receives focus --- .../java/net/ktnx/mobileledger/NewTransactionActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java index ca181200..70b56321 100644 --- a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java @@ -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"); -- 2.39.5