private void setDrawable(String filePath) { Bitmap bitmap=BitmapFactory.decodeFile(filePath); Drawable drawable = new BitmapDrawable(getResources(), bitmap); ((ImageView) findViewById(R.id.img)).setImageDrawable(drawable); }
png jpg 图片文件转Drawable
猜你喜欢
转载自blog.csdn.net/yongwoozzang/article/details/80195529
今日推荐
周排行