title: removeView(View) is not supported in AdapterView
body: <p>I want to delete a certain row from a listView when an ImageView is clicked. My listview looks like this : 
  <img src="https://i.stack.imgur.com/V5iXz.png" alt="enter image description here"></p>
  
  <p>I want that when the last image is clicked to delete that row. Here is my adapter :</p>
  
  <pre><code>public class UserItemAdapter extends ArrayAdapter&lt;Photos.Record&gt; {
          private ArrayList&lt;Photos.Record&gt; photos;
  
          public UserItemAdapter(Context context, int textViewResourceId, ArrayList&lt;Photos.Record&gt; 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;
          }
      }
  </code></pre>
  
  <p>I tried to delete the row using this :</p>
  
  <pre><code>listView.removeView(v);
  myadapter.notifyDataSetChanged();
  </code></pre>
  
  <p>and I get the error : <code>ERROR    AndroidRuntime  java.lang.UnsupportedOperationException: removeView(View) is not supported in AdapterView</code></p>
  
  <p>Where is my mystake? Any idea?</p>