문제

In Android Google Mail app, when you start typing into the "To:" field in a new email, you will get a dropdown menu, auto-populated from your contacts.

I want this behavior in my app.

Currently, when my users enter an email address, they have to type the whole thing (into, essentially, an "textEmailAddress" input field). I want to make things easier by providing contacts-based predictive entry, Google-Mail-style.

How do I do this?

(So far, I have 1. googled, 2. looked through Android SDK documentation, 3. looked through Android sources (http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android/).)

도움이 되었습니까?

해결책

You have 2 things to do

1) Get All Contact's Email ID See this Blog and Also can Search for more exapmles After getting the Email IDs Store them in An Array say emailArray

2) Use the emailArray to show in an AutoCompleteTextView

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top