插入的TextView里面的EditText android系统?里面、系统、TextView、android

2023-09-08 00:11:08 作者:久伴还是酒伴

我试图插入一个EDITTEXT内一个TextView如下

I am trying to insert a textview inside a Edittext as in below

任何人都可以请给我关于如何实现它什么想法。

can anyone pls give me ideas about how to implement it or something.

感谢:)

更新:在对的EditText将textviews动态变化。

update: the textviews in the edittext will vary dynamically.

推荐答案

我觉得你不能设置的TextView 的EditText 。 另外,也可使其看起来如此。下面是步骤

I think you cannot set TextView inside EditText. But alternatively you can make it look that way. Here are the steps

TextView的转换为 BitmapDrawable 位图转换成绘制 SpanableString ImageSpan )则可以用这个返回 SpannableString 你的的EditText convert textview to BitmapDrawable convert bitmap drawable into SpanableString (ImageSpan) then set this returned SpannableString to your EditText

我最近完成了这种用户界面,我在我的博客的制作GoSmsPro / Evernote的一样的EditText

I have recently completed this kind of ui and i have explained in my blog Making GoSmsPro/Evernote like EditText