android bitmap
来源:互联网 发布:织梦pc 手机端同步插件 编辑:程序博客网 时间:2024/05/16 01:11
Bitmap.Config conf = Bitmap.Config.ARGB_8888;WeakReference<Bitmap> bm = new WeakReference<Bitmap>(Bitmap.createBitmap(3000 + 3000, 2000, conf));Canvas canvas = new Canvas(bm.get());canvas.drawBitmap(firstBitmap, 0, 0, null);canvas.drawBitmap(bm, firstBitmap.getWidth(), 0, null);imageView.setImageBitmap(bm);
---------------orintation memory leak
--------------private ImageView miniPicture;private String imagePath;private WeakReference<Bitmap> imageBitmap;....BitmapFactory.Options options = new BitmapFactory.Options();options.inSampleSize = 8;imageBitmap = new WeakReference<Bitmap>(BitmapFactory.decodeFile(imagePath, options)); miniPicture.setImageBitmap(imageBitmap.get());
In your onDestroy method you could try something like this:
ImageView imageView = (ImageView)findViewById(R.id.my_image);Drawable drawable = imageView.getDrawable();if (drawable instanceof BitmapDrawable) { BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable; Bitmap bitmap = bitmapDrawable.getBitmap(); bitmap.recycle();}
public void setImageBitmap(Bitmap bm) { setImageDrawable(new BitmapDrawable(mContext.getResources(), bm));}
- android Bitmap
- android Bitmap
- android bitmap
- android Bitmap
- android bitmap
- android Bitmap
- Android Bitmap
- Android--Bitmap
- Android Bitmap
- Android.Bitmap
- Android Bitmap
- Android Bitmap
- Android Bitmap
- Android Bitmap
- Bitmap【Android】
- Android Bitmap
- Android Bitmap
- Android Bitmap
- Java 四种级别的修饰符
- SUSE Linux系统下安装ADSL上网拨号程序
- 字符设备驱动
- uva11880
- 解决Realplayer在Fedora中播放rmvb没声音的问题
- android bitmap
- 孜孜不倦是一种境界
- hadoop学习
- EJB3.0异常总结---javax.ejb.EJBException: Local and Remote Interfaces cannot have duplicate interface for
- complie dll for C invocation with GCC
- 杭电ACM 2035 人见人爱A^B
- linux命令
- Umbraco 5.x被放弃了
- html中文本域的默认值