-1 is the ID of the first newly added account and IDs must be unique
public long getItemId(int position) {
// header item is always first and IDs id may duplicate some of the account IDs
if (position == 0)
- return -1;
+ return 0;
TemplateDetailsItem.AccountRow accRow = differ.getCurrentList()
.get(position)
.asAccountRowItem();
if (list.size() < 1) {
final TemplateDetailsItem.Header header = TemplateDetailsItem.createHeader();
header.setName(mDefaultPatternName);
- header.setId(genItemId());
+ header.setId(0);
list.add(header);
changes = true;
}