title: adding Searchview to my listview
body: <p>please help me I want to add searchview like this <a href="https://www.youtube.com/watch?v=c9yC8XGaSv4" rel="nofollow">video</a></p>
  
  <p>to my listview in MainActivity , Actually I tired but I get crash when I open the app</p>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class MainActivity extends ListActivity {
  
  
  
  public void onCreate(Bundle icicle) {
      super.onCreate(icicle);
  
      // 1. pass context and data to the custom adapter
      MyAdapter adapter = new MyAdapter(this, generateData());
  
      //2. setListAdapter
      setListAdapter(adapter);
  
  }
  
  private ArrayList&lt;Item&gt; generateData() {
      ArrayList&lt;Item&gt; items = new ArrayList&lt;Item&gt;();
      items.add(new Item("item1", "description1"));
      items.add(new Item("item2", "description2"));
      items.add(new Item("item3", "description3"));
  
      return items;
  
  }
  </code></pre>
  
  <p>}</p>