I have a list view, containing different kinds of cells and I use an ArrayAdapter to do so.
private class MyAdapter extends ArrayAdapter<String>
{
public MyAdapter(Context context, int resource, int textViewResourceId, String[] objects)
{
super(context, resource, textViewResourceId, objects);
}
@Override
public View getView(int position, View view, ViewGroup parent)
{
View viewCE = inflater.inflate(R.layout.my_cell, parent, false);
((TextView) viewCE.findViewById(R.id.txt_cell)).setText(adapter.getItem(position));
view = viewCE;
return view;
}
}
my_cell
contains an ImageView, and what I want to do is to change the image of this ImageView when the user clicks the cell.
I already added to my code a private class implementing OnItemClickListener
with its method onItemClick()
but then I've absolutely no idea of what to do...
Thanks for your help.