插入的TextView里面的EditText android系统? [英] inserting textview inside edittext in android?

查看:229
本文介绍了插入的TextView里面的EditText android系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图插入一个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


  1. TextView的转换为 BitmapDrawable

  2. 位图转换成绘制 SpanableString ImageSpan

  3. 则可以用这个返回 SpannableString 你的的EditText

  1. convert textview to BitmapDrawable
  2. convert bitmap drawable into SpanableString (ImageSpan)
  3. 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

这篇关于插入的TextView里面的EditText android系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆