Android开发: 使用bundle封装、传递bitmap

来源:互联网 发布:mac用什么安卓模拟器 编辑:程序博客网 时间:2024/06/01 10:48
// intent包壳传递
Bitmap bitmap = null;Intent intent = new Intent();Bundle bundle = new Bundle();bundle.putParcelable("bitmap", bitmap);intent.putExtra("bundle", bundle);bitmap已实现了Parcelable接口
// msg包壳传递
Message msg = new Message();msg.what = 1;Bundle bundle = new Bundle();bundle.putParcelable("bitmap", bitmap);msg.setData(bundle);handler_FrameThambnail.sendMessage(msg);
0 0
原创粉丝点击