Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用文字显示图像。
t_s.setText("You will be shown a picture like this"+R.drawable.myimage);
那是我的代码,但不起作用,它显示的不是图像,而是数字..
您必须创建一个 TextView 和一个 ImageView 分开。
t_s.setText("You will be shown a picture like this"); t_s.setImageResource(R.drawable.myimage);
如果您需要设置背景以查看,请尝试这些代码