How to display the value of a variable on the screen?

前端 未结 5 892
别那么骄傲
别那么骄傲 2021-01-03 23:20

I know this is very basic question, but I need to know, how I can display the contents of a variable on the screen.

Do I use a textview in my layout?

I have

5条回答
  •  猫巷女王i
    2021-01-03 23:38

    If you have a list on the screen , then to not lose the list and still show change use , taking @Matt's example.

    TextView textView = (TextView) findViewById(R.id.textViewName);
    textView.setText("text you want to display");
    

    It worked for me.

提交回复
热议问题