title: autocomplete text view not working
body: <p>On my contact list application i try to use autocompletetextview when making search of contacts but is not working</p>
  
  <p>here is my Search.java:</p>
  
  <pre><code>public class Search extends  ListActivity {
  
   private static int[] TO = {R.id.name };
  private static String[] FROM = {DbConstants.NAME, DbConstants.PHONE, DbConstants.EMAIL,_ID};
  private Button sButton;
  
   private ListView lv1;
   private static SQLiteDatabase db;
    private DbCreate contacts;
    private Cursor cursor;
    private AutoCompleteTextView searchText;
    protected SimpleCursorAdapter adapter;
  
  
  protected void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
      setContentView(R.layout.search);
  
      ArrayAdapter&lt;String&gt; adapter=new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_dropdown_item_1line,new String[] {DbConstants.NAME});
      searchText=(AutoCompleteTextView)findViewById(R.id.searchtext);
      searchText.setAdapter(adapter);
  
      sButton=(Button)findViewById(R.id.searchButton);
      sButton.setOnClickListener(new OnClickListener() {
  
          public void onClick(View v) {
              // TODO Auto-generated method stub
  
              showDatabaseContent();
                lv1 = getListView();
  
                lv1.setTextFilterEnabled(true);
          }
      });
  
  
  
  
  
  }
  </code></pre>
  
  <p>And here is my search.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; 
         &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"           android:orientation="vertical" android:layout_width="fill_parent"           android:layout_height="fill_parent"&gt;
        &lt;LinearLayout 
         android:orientation="horizontal" 
         android:layout_width="fill_parent" 
        android:layout_height="wrap_content"&gt;
  
         &lt;AutoCompleteTextView
       android:id="@+id/searchtext"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_weight="1"
       android:hint="@string/searchDefault"&gt;
  
       &lt;requestFocus /&gt;
           &lt;/AutoCompleteTextView&gt; 
         &lt;Button android:id="@+id/searchButton" 
        android:icon="@drawable/search" 
         android:text="Search"
        android:layout_width="wrap_content" 
         android:layout_height="wrap_content" /&gt; 
          &lt;/LinearLayout&gt;
          &lt;TextView
      android:id="@android:id/empty"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/empt" /&gt;
          &lt;ListView
   android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" /&gt;
  
      &lt;/LinearL ayout&gt;
  </code></pre>
  
  <p>I dont get any error but search anly works when i press search button.but when i start typing a name nothing happens.where is the problem?</p>