title: Searchbox for Custom Listview
body: <p>I build a coustom listview, wich filled with data from SQLite.
  Now I want for my listview a search box like this: <a href="https://lh5.googleusercontent.com/-0H2RUBsLIYQ/Th1lqLCn5iI/AAAAAAAAALg/QZe8a5-PYu0/custom_listview_search2.png" rel="nofollow">https://lh5.googleusercontent.com/-0H2RUBsLIYQ/Th1lqLCn5iI/AAAAAAAAALg/QZe8a5-PYu0/custom_listview_search2.png</a>></p>
  
  <p>This is my activity:</p>
  
  <pre><code>package de.bodprod.rettinfo;
  
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  
  import android.app.Activity;
  import android.os.AsyncTask;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.AdapterView;
  import android.widget.AdapterView.OnItemClickListener;
  import android.widget.ListAdapter;
  import android.widget.ListView;
  import android.widget.SimpleAdapter;
  
  public class AntidotList extends Activity{
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; antidotList;
  
      String[] sqliteIds;
  
      public static String TAG_ID = "id";
      public static String TAG_TOX = "tox";
      public static String TAG_ANTIDOT = "antidot";
  
      ListView lv;
      int textlength=0;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.antidotlist_layout);
  
          antidotList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
          lv = (ListView) findViewById(R.id.antidotlistlayout);
  
          lv.setOnItemClickListener(new OnItemClickListener() {
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
  
              }
          });        
          new loadStoreAntidots().execute();
      }
  
      class loadStoreAntidots extends AsyncTask&lt;String, String, String&gt; {
          @Override
          protected String doInBackground(String... args) {
              // updating UI from Background Thread
              runOnUiThread(new Runnable() {
                  public void run() {
                      DatabaseHandler db = new DatabaseHandler(getApplicationContext());
                      List&lt;AntidotsClass&gt; antidots = db.getAllAntidots();
                      sqliteIds = new String[antidots.size()];
  
                      for (int i = 0; i &lt; antidots.size(); i++) {
  
                          AntidotsClass s = antidots.get(i);
  
                          // creating new HashMap
                          HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  
                          // adding each child node to HashMap key =&gt; value
                          map.put(TAG_ID, s.getId().toString());
                          map.put(TAG_TOX, s.getTox());
                          map.put(TAG_ANTIDOT, s.getAntidot());
  
                          // adding HashList to ArrayList
                          antidotList.add(map);
  
                          // add sqlite id to array
                          // used when deleting a website from sqlite
                          sqliteIds[i] = s.getId().toString();
                      }
                      ListAdapter adapter = new SimpleAdapter(
                          AntidotList.this,
                          antidotList, R.layout.antidotlistitem_layout,
                          new String[] { TAG_ID, TAG_TOX, TAG_ANTIDOT },
                          new int[] { R.id.sqlite_id, R.id.tox_layout, R.id.antidot_layout }
                      );
                      lv.setAdapter(adapter);
                  }
              });
              return null;
          }
      }
  }
  </code></pre>
  
  <p>This is my layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      style="@style/mainView" 
      android:orientation="vertical" &gt;
      &lt;EditText android:id="@+id/EditText01"
          android:layout_height="wrap_content"
          android:layout_width="fill_parent"
          android:hint="Suchen"&gt;                               
      &lt;/EditText&gt;    
      &lt;ListView
          android:id="@+id/antidotlistlayout"
          style="@style/mainView" 
          android:layout_width="fill_parent"
          android:layout_height="wrap_content" &gt;
      &lt;/ListView&gt;           
  &lt;/LinearLayout&gt;  
  </code></pre>
  
  <p>I don't know how to build in the search funktion.</p>
  
  <p>Hope you can help me</p>