How to overlay an EditText on a TextView immediately after text ends

I am trying to create a paragraph of text using a TextView and you need to insert an EditText between the text, for example, fill in the blanks. Is it possible to create such a custom view? Since I am new to this forum, I could post any image. It should look something like this:

The world is the common name for all human [EDIT TEXT] , in particular human experience, history or the condition of a person as a whole, throughout the world, that is, anywhere in the world. [2]

In the context of [EDIT TEXT], it may refer to: (1) the entire physical Universe or (2) the ontological world (see disclosure of the world). In the context of [EDIT TEXT], the world usually refers to the material or sphere of the profane, as opposed to heavenly, spiritual, transcendental or sacred. “Doomsday” refers to scenarios for the end of human history, often in religious contexts.


OK. Now I can post images :-) In the image below, the red colored cells are the editing texts. Other colored texts are text (sorry too many vibrant colors). Now, if I use the leftOf / rightOf methods in a RelativeLayout, it will look like a second image. Am I thinking in the wrong direction?

image http://desmond.imageshack.us/Himg822/scaled.php?server=822&filename=imagewg.png&res=landing

+3
source share
2 answers

I think the best way is to create your own editText view. however, it is probably very difficult.

if you have a short time, you can use HTML and use webView to display content. I am sure that in html this task is much easier since it has already been implemented in many places.


EDIT:

another solution is to use the FlowTextView library. it extends from RelativeLayout, but acts like a textView. I did not test it, but only ran their sample (through a cool application called DevAppDirect )

+2

, , . . . - , Romain Guy FlowLayout.

, " " , , TextView EditText addView. , , , , .

+2

All Articles