title: Android filter listview data from json
body: <p>I want to filter a listview data from json. this is what I've tried so far:</p>
  
  <pre><code>  wsSearch = (EditText) findViewById (R.id.wsSearch);
      listview = (ListView) findViewById(R.id.list_view);
      listview.setTextFilterEnabled(true);
      wsSearch.addTextChangedListener(new TextWatcher (){
  
          public void afterTextChanged(Editable arg0) {
              // TODO Auto-generated method stub
  
          }
  
          public void beforeTextChanged(CharSequence arg0, int arg1,
                  int arg2, int arg3) {
              // TODO Auto-generated method stub
  
          }
  
          public void onTextChanged(CharSequence cs, int arg1, int arg2,
                  int arg3) {
              // TODO Auto-generated method stub
              //BAPTISMAL_SONG.this.adapter2.getFilter().filter(cs); 
  
              ArrayList&lt;HashMap&lt;String, String&gt;&gt; arrayTemplist= new ArrayList&lt;HashMap&lt;String,String&gt;&gt;();
              String searchString = cs.toString();//wsSearch.getText().toString();
              for (int i = 0; i &lt; arraylist.size(); i++)
              {
                  String currentString = arraylist.get(i).get(BAPTISMAL_SONG.TAG_TITLE);
                  if (searchString.equalsIgnoreCase(currentString))
                  {
                      arrayTemplist.add(arraylist.get(i));
                  }
              }
              adapter2 = new ListViewAdapterBaptismal(BAPTISMAL_SONG.this, arraylist);
              listview.setAdapter(adapter2);
  
          }
  
      });
  </code></pre>
  
  <p>I followed this <a href="https://stackoverflow.com/questions/20696917/implementing-search-filter-for-data-from-server-retrieved-as-json">answer</a> but when I tried to enter something on my edittext it does not filter. What am I doing wrong in here? ANy help is truly appreciated. Thanks.</p>