From: Damyan Ivanov Date: Sun, 9 Dec 2018 12:47:39 +0000 (+0000) Subject: pop-up the date picked dialog as soon as the date field receives focus X-Git-Tag: v0.3~275 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=5a75a6d1ffb0c52d5aadca78aa2d6ee992bfbc84 pop-up the date picked dialog as soon as the date field receives focus --- 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");