]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java
fix transaction colouring to ignore delimiter items
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / TransactionListItem.java
index ee1810a90fc6603320fdc07cab91c565f06953c1..55fe04ac7f224c0603e92c74e328a7a9d35227cc 100644 (file)
@@ -17,6 +17,8 @@
 
 package net.ktnx.mobileledger.model;
 
+import android.support.annotation.NonNull;
+
 import java.util.Date;
 
 public class TransactionListItem {
@@ -24,15 +26,18 @@ public class TransactionListItem {
     private Date date;
     private boolean monthShown;
     private LedgerTransaction transaction;
+    private boolean odd;
     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 +50,8 @@ public class TransactionListItem {
     public LedgerTransaction getTransaction() {
         return transaction;
     }
+    public boolean isOdd() {
+        return odd;
+    }
     public enum Type {TRANSACTION, DELIMITER}
 }