Android AutoCompleteTextView with chips(带有芯片的 Android AutoCompleteTextView)
问题描述
我不确定我是否为这个 UI 功能使用了正确的词,但我附上了我希望在我的应用中实现的目标的快照.
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 使用它,用户在编辑文本中键入联系人,在用户从完成下拉列表中选择联系人后,联系人将插入到编辑文本中,如附图所示.编辑文本是仍然开放以接受进一步的输入.
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.
对于我的应用程序,我想在用户输入逗号后立即进行分组和插入,就像 StackOverflow 的标签输入一样(但我相信我可以单独处理.)我的问题是什么样的查看是这个还是我如何修改 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 库(用于 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/
如何使用它的简单示例可以在 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
这篇关于带有芯片的 Android AutoCompleteTextView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:带有芯片的 Android AutoCompleteTextView


- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01