import android.widget.TextView;
import net.ktnx.mobileledger.R;
+import net.ktnx.mobileledger.model.Data;
import net.ktnx.mobileledger.model.LedgerTransaction;
import net.ktnx.mobileledger.model.LedgerTransactionAccount;
import net.ktnx.mobileledger.model.TransactionListItem;
// WORKAROUND what seems to be a bug in CardHolder somewhere
// when a view that was previously holding a delimiter is re-purposed
// occasionally it stays too short (not high enough)
-// holder.vTransaction.measure(View.MeasureSpec
-// .makeMeasureSpec(holder.itemView.getWidth(), View.MeasureSpec.EXACTLY),
-// View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
+ holder.vTransaction.measure(View.MeasureSpec
+ .makeMeasureSpec(holder.itemView.getWidth(), View.MeasureSpec.EXACTLY),
+ View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
break;
case DELIMITER:
Date date = item.getDate();
@Override
public int getItemCount() {
- return TransactionListViewModel.getTransactionCount() + 1;
+ return Data.transactions.size() + 1;
}
public void setBoldAccountName(String boldAccountName) {
this.boldAccountName = boldAccountName;
LedgerTransaction tr = p[0].transaction;
boolean odd = p[0].odd;
- SQLiteDatabase db = MLDB.getReadableDatabase();
+ SQLiteDatabase db = MLDB.getDatabase();
tr.loadData(db);
publishProgress(new TransactionLoaderStep(p[0].holder, p[0].position, tr, odd));