private MutableLiveData<String> amountHint = new MutableLiveData<>(null);
private NewTransactionModel model;
private MutableLiveData<Boolean> editable = new MutableLiveData<>(true);
- public boolean focusIsOnAmount() {
- return focusIsOnAmount;
- }
private boolean focusIsOnAmount = false;
public Item(NewTransactionModel model) {
this.model = model;
this.account = account;
this.editable.setValue(true);
}
+ public boolean focusIsOnAmount() {
+ return focusIsOnAmount;
+ }
public NewTransactionModel getModel() {
return model;
}
this.date.setValue(date);
}
public void setDate(String text) {
+ if ((text == null) || text.trim()
+ .isEmpty())
+ {
+ setDate((Date) null);
+ return;
+ }
+
int year, month, day;
final Calendar c = GregorianCalendar.getInstance();
Matcher m = reYMD.matcher(text);