X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fmodel%2FTransactionListItem.java;h=9243721a2211405e73a65c988673e4518a165993;hp=ee1810a90fc6603320fdc07cab91c565f06953c1;hb=6f8d7eb0ab9e5754047ac5bda47868860b5f71e2;hpb=e12bae55fb75c0c30055dd34ded195e75feb3844 diff --git a/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java b/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java index ee1810a9..9243721a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java @@ -17,6 +17,8 @@ package net.ktnx.mobileledger.model; +import android.support.annotation.NonNull; + import java.util.Date; public class TransactionListItem { @@ -24,15 +26,21 @@ public class TransactionListItem { private Date date; private boolean monthShown; private LedgerTransaction transaction; + private boolean odd; + public TransactionListItem() { + this.type = Type.TRAILER; + } public TransactionListItem(Date date, boolean monthShown) { this.type = Type.DELIMITER; this.date = date; this.monthShown = monthShown; } - public TransactionListItem(LedgerTransaction transaction) { + public TransactionListItem(LedgerTransaction transaction, boolean isOdd) { this.type = Type.TRANSACTION; this.transaction = transaction; + this.odd = isOdd; } + @NonNull public Type getType() { return type; } @@ -45,5 +53,8 @@ public class TransactionListItem { public LedgerTransaction getTransaction() { return transaction; } - public enum Type {TRANSACTION, DELIMITER} + public boolean isOdd() { + return odd; + } + public enum Type {TRANSACTION, DELIMITER, TRAILER} }