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");
mSave = menu.findItem(R.id.action_submit_transaction);
if (mSave == null) throw new AssertionError();
+ check_transaction_submittable();
+
return true;
}