Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
391 views
in Technique[技术] by (71.8m points)

java - Android AutoCompleteTextView with chips

I am not sure I am using the right words for this UI feature, but I have attached a snapshot of what I am looking to achieve in my app.

Its used by Go SMS, where a user types contacts in an edit text, after the user selects a contact from the completion drop down, the contact is inserted in the edit text as show in the attached image.The edit text is still open to accept further input.

For my app, I would like to do the grouping and insertion as soon as the user enters a comma, Just like the Tag input for StackOverflow works (But I believe I can handle that alone.) My problem is what kind of View is this or how do I modify an EditText to behave like this?

EditText with Grouped Values

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The official Chips library from Google (as used in Gmail, Email, Calendar, Messaging) is located at https://android.googlesource.com/platform/frameworks/opt/chips/

A simple example of how to use it can be found at https://code.google.com/p/platform-features-talk-io-2013/source/browse/src/com/example/iotalk/ChipsActivity.java


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...