Saturday, 7 September 2013

How to print in text view line by line using loop?

How to print in text view line by line using loop?

for (Element eHead : eHeadder)
{
String tag = eHead.tagName();
if(tag.equals("p")
{
final String parsedText = eHead.text();
Log.d("testing5", parsedText);
runOnUiThread(new Runnable()
{
public void run() {
data.setText(parsedText);
}
});
}
}
In the above code, I get line of datas from "p"(paragraph) tag from an
html page on the String variable "parsedText".
But my TextView named "data" is inside the for loop and i want to print
each line of String, line by line in my TextView. Please help me with a
solution.

No comments:

Post a Comment