问题
I am new at developing Android.I have a ListView and custom ArrayAdapter which holds an arraylist.I want to update arraylist specific item by position.How can I handle please help me thanks in advance.
回答1:
Assuming your adapter is storing a List
of Foo
objects.
Foo item = mAdapter.getItem(position);
item.setValue("blah"); //Or whatever you need to update
mAdapter.notifyDataSetChanged();
来源:https://stackoverflow.com/questions/27344840/how-to-update-an-item-from-arraylist-on-arrayadapter-in-android