問題描述
我不確定我是否為這個(gè) UI 功能使用了正確的詞,但我附上了我希望在我的應(yīng)用中實(shí)現(xiàn)的目標(biāo)的快照.
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.
Go SMS 使用它,用戶在編輯文本中鍵入聯(lián)系人,在用戶從完成下拉列表中選擇聯(lián)系人后,聯(lián)系人將插入到編輯文本中,如附圖所示.編輯文本是仍然開放以接受進(jìn)一步的輸入.
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.
對(duì)于我的應(yīng)用程序,我想在用戶輸入逗號(hào)后立即進(jìn)行分組和插入,就像 StackOverflow 的標(biāo)簽輸入一樣(但我相信我可以單獨(dú)處理.)我的問題是什么樣的查看是這個(gè)還是我如何修改 EditText 以使其具有這樣的行為?
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?
謝謝.
推薦答案
Google 的官方 Chips 庫(kù)(用于 Gmail、電子郵件、日歷、消息)位于 https://android.googlesource.com/platform/frameworks/opt/chips/
The official Chips library from Google (as used in Gmail, Email, Calendar, Messaging) is located at https://android.googlesource.com/platform/frameworks/opt/chips/
如何使用它的簡(jiǎn)單示例可以在 https://code.google.com/p/platform-features-talk-io-2013/source/browse/src/com/example/iotalk/ChipsActivity.java
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
這篇關(guān)于帶有芯片的 Android AutoCompleteTextView的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!