创建具有类似标签功能的自定义 editText

2023-02-26移动开发问题
4

本文介绍了创建具有类似标签功能的自定义 editText的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我一直在四处寻找,但找不到任何答案.我要实现的是一个类似于 ICS gmail 应用程序的撰写屏幕中的收件人"字段的 EditText.

I've been searching around but could not find any answers to this. What I'm trying to implement is an EditText similar to the 'To' field found in the composing screen of the ICS gmail app.

这是一张描述我想要的图片:

Here's an image describing what I want:

我正在考虑扩展 EditText 并实现我自己的自定义 EditText 类,但我不确定如何做到这一点,或者即使这是最好的解决方案.有什么想法吗?

I'm thinking of extending EditText and implementing my own custom EditText class but I'm not really sure how to do that or even if that's the best solution. Any thoughts?

推荐答案

嗯,花了一段时间才找到一个类似的问题,但这里是 我找到的最接近的答案.我以前就知道其他人有这种问题!感谢 CommonsWare 为我指明了正确的方向.

Hm, took a while to find a similar question but nonetheless, here's the closest answer I found. I knew other people had this kind of problem before! Thanks to CommonsWare for pointing me in the right direction.

这篇关于创建具有类似标签功能的自定义 editText的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

如何在 COCOS2d Android 中使用 CClistview?
How can I use CClistview in COCOS2d Android?(如何在 COCOS2d Android 中使用 CClistview?)...
2024-08-12 移动开发问题
5

cocos2d-android:如何显示分数
cocos2d-android: how to display score(cocos2d-android:如何显示分数)...
2024-08-11 移动开发问题
7

使用自定义字体文件创建 CCMenuItemLabel
create a CCMenuItemLabel with a custom font file(使用自定义字体文件创建 CCMenuItemLabel)...
2024-08-11 移动开发问题
6

Sqlite 数据库未从资产文件夹 Android 复制
Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)...
2024-04-15 移动开发问题
8

SQLite 数据库副本在由设备而不是模拟器生成时出现损坏
SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)...
2024-04-15 移动开发问题
4

安卓文件拷贝
Android file copy(安卓文件拷贝)...
2024-04-15 移动开发问题
6