LedgerTransaction tr = transactions.get(position);
Context ctx = holder.row.getContext();
- try (SQLiteDatabase db = MLDB.getReadableDatabase(ctx.getApplicationContext())) {
+ try (SQLiteDatabase db = MLDB.getReadableDatabase(ctx)) {
tr.loadData(db);
holder.tvDescription
.setText(String.format("%s\n%s", tr.getDescription(), tr.getDate()));
TableLayout tbl = holder.row.findViewById(R.id.transaction_row_acc_amounts);
tbl.removeAllViews();
- for (Iterator<LedgerTransactionAccount> it = tr.getAccountsIterator(); it.hasNext(); ) {
- LedgerTransactionAccount acc = it.next();
+ for (LedgerTransactionAccount acc : tr.getAccounts()) {
TableRow row = new TableRow(holder.row.getContext());
TextView child = new TextView(ctx);
child.setText(acc.getShortAccountName());