- int imageId = context.getResources().getIdentifier("图片的名字","drawable", "包名");
- //iv是ImageView
- iv.setImageResource(imageId );
原文地址:https://www.cnblogs.com/Free-Thinker/p/9628654.html
时间: 2024-10-30 04:58:04
原文地址:https://www.cnblogs.com/Free-Thinker/p/9628654.html