安卓 Bitmap基本使用

来源:互联网 发布:mac root 初始密码 编辑:程序博客网 时间:2024/05/27 20:15
//讲一个Bitmap对象封装成BitmapDrawable 对象bitmapDrawable drawable = new BitmapDrawable(bitmap);//获取bitmap对象Bitmap bitmap = drawable.getBitmap();ImageView image = new ImageView(this);ImputStream assetFile = assets.open(images[currentImg++])image.setImageBitmap(BitmapFactory.decodeStream(file));

0 0