0
我想通过我自己的属性检索绘图文件夹中的drawable,而不是使用R.drawablegetDrawable从资源
我该如何实现这一目标?
public void updateLanguageImg(String img)
{
Bitmap myBitmap = BitmapFactory.decodeResource(this.getResources(),R.drawable.);
// i want retrieve the img String here
ImageView imageV = (ImageView) findViewById(R.id.imageLangue);
imageV.setImageBitmap(myBitmap);
}
非常感谢您
如果资源未找到,您还需要故障转移 – nicopico 2013-03-18 23:56:26
@Martin Cazares非常感谢。它像一个魅力 – user2177823 2013-03-19 20:30:13
没问题,很高兴帮助... – 2013-06-04 20:31:53