I am working on a contact manager project for android.In which i want to auto-fill the email address ending part in the field at the time of signup by the user. For example when user type his or her username it should be automatically gives the suggestion for @gmail.com or @outlook.com and so on.
Well,This is a little part of my code
String[] maindb = {"@gmail.com", "@rediffmail.com", "@hotmail.com", "@outlook.com"};
mail = (AutoCompleteTextView) findViewById(R.id.A1_edt_mail);
ArrayAdapter<String> adpt = new ArrayAdapter<String>(this, R.layout.support_simple_spinner_dropdown_item, maindb);
mail.setAdapter(adpt);
Well, I got output like this
But I want that when user enter his/her username then this suggestion should be appear but it din't.
Well, My question is not duplicate of android how an EditText work as AutoComplete this question.My problem is differ from this.
Thanks in advance.