In an Android TextView, is it possible to insert paragraphs?
Posted
by johnrock
on Stack Overflow
See other posts from Stack Overflow
or by johnrock
Published on 2010-06-05T06:34:37Z
Indexed on
2010/06/05
6:42 UTC
Read the original article
Hit count: 281
android
Below is an example of the type of problem that I have. I have data in a pojo that I need to display in a textview... the data has pseudo code that denotes each paragraph with [p]
I would like to somehow parse the [p]'s into paragraphs when they are displayed in the textview. Can this be done? Is there something I can substitute for the [p] that will make a new paragraph in the textview?
Question question = new Question();
question.setText("Here is the first paragraph.[p] And this should be the second.");
TextView view = (TextView) findViewById(R.id.qtext);
view.setText(question.getParsedText());
© Stack Overflow or respective owner