Use Custom ArrayAdapter for AutoCompleteText View
<p>I Used customized array adapter for my AutocompleteTextView. This is it.</p>

<p>public class AutoCompleteAdapter extends ArrayAdapter{</p>

<pre><code>String[] Objects;
Context context;

public AutoCompleteAdapter(Context context, int textViewResourceId,
String[] objects) {
    super(context, textViewResourceId, objects);
    this.context = context;
    this.Objects = objects;
// TODO Auto-generated constructor stub
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {

    LayoutInflater inflater=((Activity)context).getLayoutInflater();
    View row=inflater.inflate(R.layout.row, parent, false);
    TextView label=(TextView)row.findViewById(R.id.weekofday);
    label.setText(Objects[position]);
    return row;
}
</code></pre>

<p>}</p>

<p>Here is the code where I used this array adaptor.</p>

<pre><code>AutoCompleteAdapter adapter = new AutoCompleteAdapter(context, R.layout.row, DATA);
textView.setAdapter(adapter);
this.addView(textView);
</code></pre>

<p>But the problem is when I used this custom ArrayAdaptor dropdown list is not the correct occurrences. I mean If I type "Au" it doesn't appear "Australia" and "Austria". It shows the first tow countries in my array. If I used normal array adaptor It works. Please help me!!!  </p>
