android - 在 EditText 中“阻止”特定格式的文本

标签 android

好吧,我不知道应该如何调用它。任何人都可以建议我如何做下面的事情?

因此,当用户完成以某种格式编写文本时,该文本将被“阻止”,以后用户可以在需要时删除整个“阻止”文本,而不是逐个字符。

enter image description here

最佳答案

这就是所谓的“筹码”。至少根据 Roman Nurik 在 this G+ post 中的说法.

A growing trend across social and communication-related apps is to afford recipient selection using tokenized auto-completing text fields. This kind of UI is more concise than list-based interfaces, and more visually rich, intuitive (exposes a better mental model), and directly manipulable (manage recipients by touching their token) than comma-separated text fields.

它基本上是一个高度定制的MultiAutoCompleteTextView。您可以从 repository 获取它的实现。 。一个示例是在 AOSP 消息(即 SMS)应用程序中,检查 RecipientsEditor类(class)。看起来很复杂。

关于android - 在 EditText 中“阻止”特定格式的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24006052/

相关文章:

Android GPS需要太多时间来获取位置坐标

android - 以下类无法实例化 :- android. support.design.widget.FloatingActionButton

javascript - 把我的 php 文件放在哪里?

java - Android 设置壁纸 - 一般尺寸?

android - 如何从 Overlay onTap 方法将按下的位置返回到 MapActivity

android - 一个 Activity,多个 Fragments 和 setRetainInstance

android - 两个 Viewpager 和一个选项卡布局的滑动问题

java - 如何在全局变量的回调中存储数据?

android - MediaPlayer.OnInfoListener 未在旧设备上调用

android - android apk 中的 libclasifier_jni.so 是什么?