如何只是文字结束后叠加的EditText TextView的上 [英] How to overlay EditText on TextView just after the end of text

查看:200
本文介绍了如何只是文字结束后叠加的EditText TextView的上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个使用TextView的一段文字,需要像填空文字之间插入的EditText。是否有可能建立这样的自定义视图?
正如我在这个论坛是新我可以张贴任何图像。它看起来有点像如下:

世界是对整个人类的 ,特别是人的经验,历史上,还是在一般情况下,全球范围内,即在地球上任何地方的人的条件。[2]

方面,它可能是指:(1)整个物理世界,或(2)的本体世界(见世界披露)。在 的背景下,世界上通常是指材料或亵渎领域,而不是天体,精神,超然神圣或。 世界的尽头是指人类历史的最后结束的情况下,往往在宗教背景。


确定。现在,我可以发表图片:-)
在下图中,红色细胞是在编辑文本。其他颜色的文本是textviews(不好意思太鲜艳的颜色)。现在,如果我用leftOf / rightOf方法RelativeLayout的它看起来就像第二个图像。我在错误的方向在想什么?

图像


解决方案

我认为最好的办法是创建自己的EDITTEXT视图。然而,这可能是做一个很辛苦的事情。

如果你的时间很短,就可以使用HTML和使用网页视图来显示内容。我是pretty确保在HTML这个任务要容易得多,因为它在很多地方已经实施。


编辑:

另一个解决方案是使用 FlowTextView 的库。它的RelativeLayout延伸,但作为一个TextView。我没有测试,但只跑了他们的样品(通过所谓的 DevAppDirect

I am trying to create a paragraph of text using TextView and need to insert EditText in between text like fill in the blanks. Is it possible to build custom view like that ? As I am new in this forum I could post any image. It should look somewhat like below:

World is a common name for the whole of human [EDIT TEXT], specifically human experience, history, or the human condition in general, worldwide, i.e. anywhere on Earth.[2]

In a [EDIT TEXT] context it may refer to: (1) the whole of the physical Universe, or (2) an ontological world (see world disclosure). In a [EDIT TEXT] context, world usually refers to the material or the profane sphere, as opposed to the celestial, spiritual, transcendent or sacred. The "end of the world" refers to scenarios of the final end of human history, often in religious contexts.


ok. Now I can post images :-) In the image below, red colored cells are edit texts. Other colored texts are textviews (sorry too much bright colors). Now, if I use leftOf/rightOf methods in RelativeLayout it will look like the second image. Am I thinking in the wrong direction ?

解决方案

i think the best way would be to create your own editText view . however, this is probably a very hard thing to do.

if you are short in time , you can use HTML and use a webView to show the content . i'm pretty sure that in html this task is much easier , as it's already implemented in many places.


EDIT:

another solution is to use FlowTextView library . it extends from RelativeLayout, but acts as a textView. i didn't test it but only ran their sample (via a cool app called DevAppDirect)

这篇关于如何只是文字结束后叠加的EditText TextView的上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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