Convert number in textview to int

前端 未结 5 1675
渐次进展
渐次进展 2021-02-13 10:27

So, I am messing around with java/android programming and right now I am trying to make a really basic calculator. I am hung up on this issue though. This is the code I have r

5条回答
  •  自闭症患者
    2021-02-13 10:58

    TextView tv = (TextView)findviewbyID(R.id.textView);
    int num = Integer.valueOf(tv.getText().toString());
    

提交回复
热议问题