发送方:
Bitmap bmp= BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher); Bundle b = new Bundle(); b.putParcelable("bitmap", bmp); Intent intent = new Intent(MainActivity.this,Main2Activity.class); intent.putExtras(b); startActivity(intent);
接收方:
Intent intent=getIntent(); Bundle b=intent.getExtras(); Bitmap bmp=(Bitmap) b.getParcelable("bitmap"); img.setImageBitmap(bmp);