How to replace R.drawable.“someString”

后端 未结 6 982
长发绾君心
长发绾君心 2021-02-02 10:00

I have some Images in my project. The name of the image is stored in a String and I would like to setImageResource(R.drawable.\".....\"); with the string of the image name but t

6条回答
  •  再見小時候
    2021-02-02 10:36

    See this thread. It should help you. Basically you need to get the identifier and then load using setImageResource.

提交回复
热议问题