model.setFocusedItem(1);
}
public void toggleAllEditing(boolean editable) {
- for (int i = 0; i < model.getAccountCount(); i++) {
- model.getItem(i + 1)
+ // item 0 is the header
+ for (int i = 0; i <= model.getAccountCount(); i++) {
+ model.getItem(i)
.setEditable(editable);
- notifyItemChanged(i + 1);
- // TODO perhaps do only one notification about the whole range [1…count]?
+ notifyItemChanged(i);
+ // TODO perhaps do only one notification about the whole range (notifyDatasetChanged)?
}
}
public void reset() {
if (presentItemCount > 2)
notifyItemRangeRemoved(3, presentItemCount - 2); // all the rest are gone
}
+ public void updateFocusedItem(int position) {
+ model.updateFocusedItem(position);
+ }
+ public void noteFocusIsOnAccount(int position) {
+ model.noteFocusIsOnAccount(position);
+ }
+ public void noteFocusIsOnAmount(int position) {
+ model.noteFocusIsOnAmount(position);
+ }
}