how to get text from textview

前端 未结 5 1105
有刺的猬
有刺的猬 2020-12-01 13:40

if I have set text in textview in such way, which is not problem:

  tv.setText(\"\" + ANS[i]);

this simply getting from this way.



        
5条回答
  •  忘掉有多难
    2020-12-01 14:27

    You have to do the following:

    a=a.replace("\n"," ");
    a=a.trim();
    String b[]=a.split("+");
    int k=Integer.ValueOf(b[0]);
    int l=Integer.ValueOf(b[1]);
    int sum=k+l;
    

提交回复
热议问题