Not Reading text from server

前端 未结 2 1774
余生分开走
余生分开走 2021-01-28 02:08

I am trying to read all the text from server, I think that my code is not retrieving text from server will you please help me how can I fix this problem, I am new to android dev

2条回答
  •  -上瘾入骨i
    2021-01-28 02:44

    Take these lines

    tv.setText(line);
    setContentView(tv);
    

    out of while loop

    Use StringBuilder object (declared before loop) in while loop and append the strings in that. After while loop take string from StringBuilder and do tv.setText(string)

提交回复
热议问题