public ShowInfo getShowInfo(String id) { Log.d("DEBUG", "ShowsArrayAdapter getCount" + this.getCount()); for (int i = 0; i < this.getCount(); i++) { ShowInfo curItem = getItem(i); Log.d("DEBUG", "ShowsArrayAdapter curItemId" + curItem.getId() + "looking for " + id); if (curItem.getId().equals(id)) { return curItem; } } return null; }
public void update(ShowInfo showInfo) { ShowInfo match = getShowInfo(showInfo.getId()); Log.d("DEBUG", "After update in ShowsArrayAdapter"); if (match != null) { match.updateShowInfo(showInfo); Log.d("DEBUG", "After match in update " + match.getAsString()); this.notifyDataSetChanged(); } }