I got this error trying to get all items with specific object and store it to my Listview.
Following the codes:
SimpleDateFormat formatdate = new SimpleDateFormat("MMM. dd, yyyy");
String selecdate = formatdate.format(date);
if (eventDates.contains(selecdate)) {
for (int i = 0; i < eventsList.size(); i++) {
HashMap<String, Object> obj = (HashMap<String, Object>) adapter.getItem(i);
ListAdapter list = (ListAdapter) obj.get("eventtitle");
myList.setAdapter(list);
}
}
else {
myList.setAdapter(null);
}