title: Not showing proper result on listview after filtering it
body: <p>I have search view which done by using filter method in adapter class so issue is that whenever I am entering the full name or number  for search its not showing result only first item of <code>ListView</code> showing  but if I entering first character or number its showing result so I want that whenever I am entering full name or number there should be result, I did debug and I found everything correct in side my code please help.</p>
  
  <pre><code>public class AdmitPatientAdapter extends BaseAdapter {
  
      private Activity activity;
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; data;
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; TempArrList = new ArrayList&lt;&gt;();
      private static LayoutInflater inflater = null;
      public static final String TAG_MRDNO = "mrd_no";
  
  
      public AdmitPatientAdapter(Activity a, ArrayList&lt;HashMap&lt;String, String&gt;&gt; d) {
          activity = a;
          data = d;
          TempArrList.addAll(d);
          inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      }
  
  
      public int getCount() {
          return TempArrList.size();
      }
  
      public Object getItem(int position) {
          return position;
      }
  
      public long getItemId(int position) {
          return position;
      }
  
      public void filter(String charText) {
          charText = charText.toLowerCase(Locale.getDefault());
          TempArrList.clear();
          if (charText.length() == 0) {
              TempArrList.addAll(data);
  
          } else {
              for (int i = 0; i &lt; data.size(); i++) {
                  HashMap&lt;String, String&gt; tMap;
                  tMap = data.get(i);
                  if (charText.length() != 0 &amp;&amp; tMap.get("mrd_no").toLowerCase(Locale.getDefault()).contains(charText)) {//mrd_no
                      TempArrList.add(tMap);
                  } else if (charText.length() != 0 &amp;&amp; tMap.get("pname").toLowerCase(Locale.getDefault()).contains(charText)) {//pname
                      TempArrList.add(tMap);
                  }
              }
  
          }
          notifyDataSetChanged();
  
      }
  
  
      public View getView(int position, View convertView, ViewGroup parent) {
  
          View viw = convertView;
          if (convertView == null)
              viw = inflater.inflate(R.layout.ip_ptn_items, null);
          TextView txt_Mr_dno = (TextView) viw.findViewById(R.id.txtMrdno);
          TextView txt_pitnt_Name = (TextView) viw.findViewById(R.id.txtpitntName);
          TextView txt_Bed_no = (TextView) viw.findViewById(R.id.txtBedno);
          TextView txt_Dob = (TextView) viw.findViewById(R.id.txtDob);
  
          TextView txt_drNme = (TextView) viw.findViewById(R.id.txtDr);
          TextView txt_Sex = (TextView) viw.findViewById(R.id.txtSex);
          TextView txt_Wrdnm = (TextView) viw.findViewById(R.id.txtWrdnm);
  
          HashMap&lt;String, String&gt; item = new HashMap&lt;String, String&gt;();
          item = data.get(position);
          String mrd_no = item.get(TAG_MRDNO);
          item.put(TAG_MRDNO, mrd_no);
          mrd_no = item.get(TAG_MRDNO);
  
          if (mrd_no.endsWith("*")) {
              txt_Mr_dno.setTextColor(Color.MAGENTA);
              txt_pitnt_Name.setTextColor(Color.MAGENTA);
              txt_Dob.setTextColor(Color.MAGENTA);
              txt_Sex.setTextColor(Color.MAGENTA);
              txt_Wrdnm.setTextColor(Color.MAGENTA);
              txt_Bed_no.setTextColor(Color.MAGENTA);
  
  
          } else {
              txt_Mr_dno.setTextColor(Color.BLACK);
              txt_pitnt_Name.setTextColor(Color.BLACK);
              txt_Dob.setTextColor(Color.BLACK);
              txt_Sex.setTextColor(Color.BLACK);
              txt_Wrdnm.setTextColor(Color.BLUE);
              txt_Bed_no.setTextColor(Color.BLUE);
  
          }
  
          //Setting all values in listview
          txt_Mr_dno.setText(item.get("mrd_no"));
          txt_pitnt_Name.setText(item.get("pname"));
          txt_Bed_no.setText(item.get("bed_no"));
          txt_Dob.setText(item.get("dob"));
          //txt_admit_Date.setText(item.get("admission_date"));
          txt_Sex.setText(item.get("sex"));
          txt_Wrdnm.setText(item.get("nursingstation"));
          txt_drNme.setText(item.get("doctor"));
  
  
          //  item = data.get(position);
          ///  String userType = item.get(TAG_UTYPE);
          //  item.put(TAG_UTYPE, mrd_no);
          //  userType = item.get(TAG_UTYPE);
  
          try {
              if (item.get("userType").equals("doctor")) {
                  txt_drNme.setVisibility(View.INVISIBLE);
              } else {
                  txt_drNme.setVisibility(View.VISIBLE);
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
          return viw;
  
      }
  
  }
  </code></pre>