private final MutableLiveData<Integer> focusedItem = new MutableLiveData<>(0);
private final MutableLiveData<Integer> accountCount = new MutableLiveData<>(0);
private final MutableLiveData<Boolean> simulateSave = new MutableLiveData<>(false);
+ final MutableLiveData<Boolean> showCurrency = new MutableLiveData<>(false);
public boolean getSimulateSave() {
return simulateSave.getValue();
}
3a) there must be exactly one empty amount (with account)
4) empty accounts with empty amounts are ignored
5) a row with an empty account name or empty amount is guaranteed to exist
+ 6) at least two rows need to be present in the ledger
+
*/
@SuppressLint("DefaultLocale")
public void checkTransactionSubmittable(NewTransactionItemsAdapter adapter) {
adapter.addRow();
}
+ // 6) at least two rows need to be present in the ledger
+ while (this.items.size() < 2) adapter.addRow();
+
debug("submittable", submittable ? "YES" : "NO");
isSubmittable.setValue(submittable);
items.add(itemCount - 1, acc);
}
}
+ public void toggleCurrencyVisible() {
+ showCurrency.setValue(!showCurrency.getValue());
+ }
enum ItemType {generalData, transactionRow, bottomFiller}
//==========================================================================================