Email auto-complete

So your login screen has an email address field? It’s easy to save your users some typing by auto-completing email addresses from Android’s account manager.

Firstly, ask for the GET_ACCOUNTS permission in AndroidManifest.xml:
<uses-permission android:name="android.permission.GET_ACCOUNTS" />

This snippet queries the account manager for Google accounts (almost every user has at least one) and puts those email addresses in an ArrayAdapter.

The only thing left to do is change the EditText to an AutoCompleteTextView and call setAdapter(getEmailAddressAdapter(context)) on that View.

You might also consider simply setting the text of the email field when there is a single email address in the account manager.