title: notifyDataSetChanged removes last view
body: <p>I have used Base Adapter to populate ListView and when i am removing an item from list and calling adapter.notifyDataSetChanged then it is always deleting last View. As I read from other posts it instead of deleting last view it might be hiding last view because count of list decreases by 1.
  Can anyone help me to display the required contents.</p>
  
  <p>Here is my adapter class</p>
  
  <pre><code>public class ListOfFav extends BaseAdapter {
  
      TextView qid,ques,category;
      ArrayList&lt;HashMap&lt;String,String&gt;&gt; flightArray=new ArrayList&lt;HashMap&lt;String,String&gt;&gt;();
  
      private static final String TAG_QID = "qid";
      private static final String TAG_QUES = "question";
      private static final String TAG_CAT= "category";
      Context context;
      ListOfFav() {
      }
  
      public ListOfFav(ArrayList&lt;HashMap&lt;String,String&gt;&gt; flightList,Context c){
          Log.v("Constructor", String.valueOf(flightArray.size()));
          flightArray=flightList;
          context=c;
      }
  
  
      public int getCount() {
          // TODO Auto-generated method stub
          return flightArray.size();
      }
  
      public Object getItem(int arg0) {
  
          // TODO Auto-generated method stub
          return null;
      }
  
      public long getItemId(int position) {
          // TODO Auto-generated method stub
          return position;
      }
  
      public  View getView(int position, View convertView, ViewGroup parent) {
  
          LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          View row;
          if(convertView==null||convertView.getTag()==null)
               row = inflater.inflate(R.layout.list_questions_main, parent, false);
  
          else
              row=convertView;
  
              qid=(TextView)row.findViewById(R.id.tQid);
              ques= (TextView) row.findViewById(R.id.tQuestion);
              category = (TextView) row.findViewById(R.id.tCategory);
  
              qid.setText(flightArray.get(position).get(TAG_QID));
              ques.setText(flightArray.get(position).get(TAG_QUES));
              category.setText(flightArray.get(position).get(TAG_CAT));
  
              return (row);
      }
  }
  </code></pre>
  
  <p>and i am updating it as:</p>
  
  <pre><code>for (HashMap&lt;String, String&gt; map : FavoriteList) {
          if (map.get(TAG_QID).equals(t.getText().toString())) 
              {
                   FavoriteList.remove(i);
                   favAdapter.notifyDataSetChanged();
                   break;
              }
          i++;
   }
  </code></pre>