]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java
transaction list: add a hollow placeholder at the bottom of the list
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / TransactionListItem.java
index 7694578e8578effd36b9ac9c713b1f771c484c7c..9243721a2211405e73a65c988673e4518a165993 100644 (file)
@@ -26,14 +26,19 @@ 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() {
@@ -48,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}
 }