title: How to refresh the List from that Adapter which Implement ListAdapter
body: <p>I have a Adapter which implements ListAdapter,</p>
  
  <p>I have a one button on item of list, when I click on that button, that item is deleted from data, after deleting that item from list I want to refresh the List,</p>
  
  <p>notifyDataSetChanged() method is not available in ListAdapter</p>
  
  <p><strong>Edited:</strong> </p>
  
  <pre><code>public class ShoppingListAdapter implements ListAdapter {
  
  ArrayList&lt;ProductInfoDTO&gt; data;
  private LayoutInflater inflater = null;
  Context context;
  Activity activity;
  String TAG = getClass().getSimpleName();
  
  DBQuery mDBQuery;
  
  public ShoppingListAdapter(Context context, ArrayList&lt;ProductInfoDTO&gt; data) {
  
      this.context = context;
      this.data = data;
      activity = (Activity) context;
      inflater = ((Activity) context).getLayoutInflater();
  
      mDBQuery = new DBQuery(context);
  }
  
  @Override
  public int getCount() {
      return data.size();
  }
  
  @Override
  public Object getItem(int position) {
  
      return data.get(position);
  }
  
  @Override
  public long getItemId(int position) {
      return position;
  }
  
  @Override
  public int getItemViewType(int position) {
      return position;
  }
  
  @Override
  public View getView(final int position, View convertView, ViewGroup parent) {   
  
      MyCartItemView view = null;
  
      if (convertView == null) {
          view = new MyCartItemView(activity, data.get(position));
      } else {
          view = (MyCartItemView) convertView;
      }
      view.setPosition(position);
  
      Button delete;
  
      delete = (Button) view.findViewById(R.id.delete);
  
      delete.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
  
              Toast.makeText(context, "delete clicked", Toast.LENGTH_SHORT)
                      .show();
  
              // delete from database
              mDBQuery.DeleteCartData(data.get(position).cart_id);
  
              // delete from data
              data.remove(data.get(position));
  
              // now I want to refresh the list here                              
  
          }
      });
  
  
      return view;
  }
  
  @Override
  public int getViewTypeCount() {
      return data.size();
  }
  
  @Override
  public boolean hasStableIds() {
      return false;
  }
  
  @Override
  public boolean isEmpty() {
      return false;
  }
  
  @Override
  public void registerDataSetObserver(DataSetObserver observer) {
  
  }
  
  @Override
  public void unregisterDataSetObserver(DataSetObserver observer) {
  
  }
  
  @Override
  public boolean areAllItemsEnabled() {
      return true;
  }
  
  @Override
  public boolean isEnabled(int position) {
      return true;
  }
  }
  </code></pre>