仅仅需三行代码:
Resources resources = getBaseContext().getResources(); Drawable imageDrawable = resources.getDrawable(R.drawable.background_image); //图片在drawable文件夹下 mImageView.setBackgroundDrawable(imageDrawable);