Android:AutoCompleteTextView
<p>I'm a beginner in Android. I have a problem when i tried to populate values from SQLite database to an AutoCompleteTextView. I got values from the database to a string array via a function <strong>getAllFnames()</strong>[*<em>shown below</em>*]. But AutoCompleteTextView is not showing any suggestions at run time..anybody there to help me.....codes are given below..please check..thank you..(Log Cat is showing some filtering problems!)</p>

<pre><code> public String[] getAllFnames() {

     database=open();
     Fname=new String[1000];
     int i=0;
Cursor cursor = database.query(DbCreation.PATIENT_TABLE,Columns, null, null, null, null, null);
          cursor.moveToFirst();
          while (!cursor.isAfterLast()) {
          Fname[i]=cursor.getString(1).toString();
          Log.v("DataBaseValues...", Fname[i]);
          cursor.moveToNext();
          i++;
        }

        // Make sure to close the cursor
        cursor.close();
        return Fname;
}
</code></pre>

<p>At text view side</p>

<pre><code>      Fname=ss.getAllFnames();//here Fname is a string array
             //"ss" is the object of class where method getAllFname()  is placed.
ArrayAdapter&lt;String&gt; fnameAdapter=new ArrayAdapter&lt;String&gt;(this,R.layout.list,Fname);

     fnameSearch.setThreshold(1);//fnameSearch is the AutoCompleteTextView

     fnameSearch.setAdapter(fnameAdapter);

     fnameSearch.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
}
</code></pre>
