如何发送包含绘制对象从一个android的活动到另一个使用意图的对象?
问题描述:
我已经通过了这个:How从一个Android的活动发送对象到另一个使用意图?
但我在对象发送图像到其他活动所面临的问题。
But i'm facing problem in sending images in the object to the other activity.
请帮忙。
答
将您绘制对象为位图,并将其发送到另一个活动。
Convert your Drawable to Bitmap and send it to Another Activity.
Bitmap bitmap = ((BitmapDrawable)d).getBitmap();
要发送,
intent.putExtra("Bitmap", bitmap);
要取,
Bitmap bitmap = (Bitmap)this.getIntent().getParcelableExtra("Bitmap");