+ switch (item.getType()) {
+ case generalData:
+ // bad idea - double pop-up, and not really necessary.
+ // the user can tap the input to get the calendar
+ //if (!tvDate.hasFocus()) tvDate.requestFocus();
+ switch (item.getFocusedElement()) {
+ case TransactionComment:
+ tvTransactionComment.setVisibility(View.VISIBLE);
+ tvTransactionComment.requestFocus();
+ break;
+ case Description:
+ boolean focused = tvDescription.requestFocus();
+ tvDescription.dismissDropDown();
+ if (focused)
+ Misc.showSoftKeyboard(
+ (NewTransactionActivity) tvDescription.getContext());
+ break;
+ }
+ break;
+ case transactionRow:
+ switch (item.getFocusedElement()) {
+ case Amount:
+ tvAmount.requestFocus();
+ break;
+ case Comment:
+ tvComment.setVisibility(View.VISIBLE);
+ tvComment.requestFocus();
+ break;
+ case Account:
+ boolean focused = tvAccount.requestFocus();
+ tvAccount.dismissDropDown();
+ if (focused)
+ Misc.showSoftKeyboard(
+ (NewTransactionActivity) tvAccount.getContext());
+ break;
+ }
+
+ break;