I am working on a contact manager project for android. In which I want to automatically fill in the final part of the email address in the field during user registration. For example, when a user enters his username, he should automatically give an offer to @ gmail.com or @ outlook.com, etc.
Well, this is a small 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 this conclusion

But I want that when the user enters his username, this sentence should appear, but it is not.

Well, my question does not duplicate android, how EditText works as autocomplete
this question. My problem is different from this.
Thanks in advance.