Auto completed text view to filter the items present in the arraylist in android
<p>I have Auto completed text view,i want to filter the items present in the listcli arraylist.i enter the text "te" means it shows text as Apple test,Dmn test,Testing,Test 124 etc.But i want to show only Testing,Test 124 etc only.How can i filter these text?Also after enter the text,i click the next button in keyboard it doesn't go for the next edit text field,How do control this the keyboard? </p>

<pre><code>client.addTextChangedListener(new TextWatcher() {

            public void onTextChanged(CharSequence s, int start, int before,
                    int count) {
                // TODO Auto-generated method stub
                cli = client.getText().toString();
                actionvalues = ReadXML.getXmlData("WebService", Base_Url
                        + "GetclientList?xml=" + client.getText().toString(),
                        "ClientList", "Client", "CID", "ClientName");

                for (int i = 0; i &lt; actionvalues.size(); i++) {
                    String client = actionvalues.get(i).get("ClientName")
                            .toString();
</code></pre>

<p>listcli is array list</p>

<pre><code>listcli.add(client);

            }


            adapter = new ArrayAdapter&lt;String&gt;(SalesActivity.this,
                    android.R.layout.simple_dropdown_item_1line,listcli);
            client.setAdapter(adapter);
</code></pre>
