I want to make a autocomplete in an activity form..(email case) I want to activate the autocompleteTextView when the user press (@) like .. widy@ and the autocomplete activate just like (@gmail.com,@hotmail.com,etc..).. please how can I do this?
String[] email = {"@gmail.com", "@hotmail.com", "@yahoo.com"};
ArrayAdapter<String> adapter = new ArrayAdapter<String>
(this, android.R.layout.select_dialog_item,email);
AutoCompleteTextView actv = (AutoCompleteTextView) findViewById(R.id.auto);
actv.setThreshold(1);
actv.setAdapter(adapter);
I tried this code but it's only activated when the @ is the first character.