如果我要在ImageView中设置图像,要从sdcard中获取,我使用的下面的代码:
Drawable c = Drawable.createFromPath(imgPath);
if(c!=null)
imageView.setImageResource(c);
如果文件需要一个已存在的控件。如果图像不存在,createFromPath方法会返回什么?
如果我要在ImageView中设置图像,要从sdcard中获取,我使用的下面的代码:
Drawable c = Drawable.createFromPath(imgPath);
if(c!=null)
imageView.setImageResource(c);
如果文件需要一个已存在的控件。如果图像不存在,createFromPath方法会返回什么?