I'm trying to implement this example from this MultiChoiceAdapter library.
It looks perfect so far. The only thing that I changed is the ListView
height and added a Button
after such ListView
.
Now, my idea with that Button
is to update the adapter. For that, I created the following method:
private void updateData(Bundle savedInstanceState){
List<String> items = Arrays.asList("Item1", "Item2", "Item3", "Item4");
adapter = null;
adapter = new ComplexItemLayoutAdapter(savedInstanceState, items);
adapter.notifyDataSetChanged();
}
At the end, it did not work. I tried following this answer, but it did not work because this example does not extend ArrayAdapter.
What can I do to update this kind of adapter?
Many thanks.