【发布时间】:2014-12-08 14:53:00
【问题描述】:
我的代码是这样的
ll.setBackground(Drawable.createFromPath(new ImageLoader().fullPath+"/desiredFilename.png"));
ll是我的线性布局的对象,这是正确的方法吗
Bitmap bitmap = BitmapFactory.decodeFile(new ImageLoader().fullPath+"/desiredFilename.png");
Resources res=getResources();
BitmapDrawable bitmapDrawable = new BitmapDrawable(res,bitmap);
ll.setBackground(bitmapDrawable);
我也使用了这个代码,但是没用 显示错误 noSuchMethods
【问题讨论】:
标签: android android-layout android-activity