this is a good idea because of the side effect it has when a new
transaction from today comes after a refresh -- you see it pop in under
the date row
without the date row (which is at the top of the scroll view when
pulling to refresh) the new appears outside of the visible scroll window
and one has to to see it -- it appears as if the refresh didn't do
anything later problem still stays when the first transaction is for a
past(1) and the newly coming ones are from a later (than (1)) date
a possible solution is to convert the "Last updated" header to a special
kind of transaction list item (there are three now - date line,
transaction box and bottom filler) that always sits on the top of the
list and all incoming transactions are inserted below it -- always pop
in nicely
public void put(LedgerTransaction transaction, SimpleDate date) {
if (done)
throw new IllegalStateException("Can't put new items after done()");
- if (null == latestDate)
+ if (null == latestDate) {
latestDate = date;
+ list.add(new TransactionListItem(date, SimpleDate.today().month != date.month));
+ }
earliestDate = date;
if (!date.equals(lastDate)) {