开发者

How to parse data under Textview

can anybody help me? I'm writing an application for Android开发者_运维问答 that parses data from internet and writes them into TextView.

TextView[] dva = new TextView[sitesList.getDva().size()];

// Set the result text in textview and add it to layout 
for (int i = 0; i < sitesList.getDva().size(); i++) {       
    dva[i].new TextView(this);
    dva[i].setText("KOSILO: "+sitesList.getDva().get(i));

layout.addView(dva[i]);

Under dva[i] I parse 5 objects that I would like them to display them under one TextView.

TextView textView1 = (TextView) findViewById(R.id.kosilodva);
    textView1.setText("KOSILO: "+sitesList.getDva().get(i));

How can I do this? Thanks in advance to everybody who is willing to help me.


Instead of setText why don't you try append,

Replace this,

 textView1.setText("KOSILO: "+sitesList.getDva().get(i));

with,

textView1.append("KOSILO: "+sitesList.getDva().get(i));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜