When I am doing Swing programming, javax.swing.table.AbstractTableModel is having fireTableCellUpdated(row, col), to let me specific which row and col of GUI I want to update.
However, when comes to ArrayAdapter, I realize they only provide notifyDataSetChanged. I was expecting I am having access to notifyDataSetChanged(row), to let me update the item I am interested in. I do not want to update the entire list.
I was wondering why don’t we have ArrayAdapter’s notifyDataSetChanged(row). Or, am I missing something?
Ask Google. 😉
Nope.
You are (by calling
notifyDataSetChanged()) just telling theListViewto redraw the whole list, even if you just have to update a specific item. I believe Google have a good reason for why this was omitted, but as it stands, you are perfectly fine with callingnotifyDataSetChanged().