我有一个数据库,我可以在下面设置图片地址。字符串 这样 "R.mipmap.image"
.但如何使用Glide库中的这个字符串来打开一张图片?(只能用 字符串 本地图像地址)
Glide.with(this).load(???).into(image);
你可以使用标识符来获取想要的图片
Resources res = context.getResources();
return res.getDrawable(res.getIdentifier(idName, "drawable", context.getPackageName()));