removeView (View) n'est pas pris en charge dans AdapterView

Je veux supprimer un certain rang, à partir d'une liste lorsque une ImageView est cliqué. Mon listview ressemble à ceci :
removeView (View) n'est pas pris en charge dans AdapterView

Je veux que lorsque la dernière image, c'est cliqué pour supprimer cette ligne. Voici ma carte :

public class UserItemAdapter extends ArrayAdapter<Photos.Record> {
private ArrayList<Photos.Record> photos;
public UserItemAdapter(Context context, int textViewResourceId, ArrayList<Photos.Record> photos) {
super(context, textViewResourceId, photos);
this.photos = photos;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.photorowlist, null);
v.setClickable(true);
v.setFocusable(true);
}
Photos.Record user = photos.get(position);
if (user != null) {
TextView photo_name = (TextView) v.findViewById(R.id.photoname);
if (photo_name != null) {
photo_name.setText(user.photo_name);
}
}
v.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
//Toast.makeText(view.getContext(), "Clicked", Toast.LENGTH_SHORT).show();
ImageView delete_photo = (ImageView) view.findViewById(R.id.deletephoto);
delete_photo.setOnClickListener(new OnClickListener(){  
@Override  
public void onClick(View v) {  
Toast.makeText(Photos.this, "Delete Button Clicked", Toast.LENGTH_SHORT).show();  
listView.removeView(v);
myadapter.notifyDataSetChanged();
}});
}
});
return v;
}
}
public class Record {
public String photo_name;
public Record(String photo_name) {
this.photo_name = photo_name;
}
}

J'ai essayé de supprimer la ligne en utilisant ceci :

listView.removeView(v);
myadapter.notifyDataSetChanged();

et j'obtiens l'erreur : ERROR AndroidRuntime java.lang.UnsupportedOperationException: removeView(View) is not supported in AdapterView

Où est mon mystake? Une idée?

source d'informationauteur Gabrielle