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?
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 < actionvalues.size(); i++) {
String client = actionvalues.get(i).get("ClientName")
.toString();
listcli is array list
listcli.add(client);
}
adapter = new ArrayAdapter<String>(SalesActivity.this,
android.R.layout.simple_dropdown_item_1line,listcli);
client.setAdapter(adapter);
let arr[20] be the array of strings for autocomplete text view