How can I pass a Bitmap object from one activity to another

前端 未结 10 926
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 03:39

In my activity, I create a Bitmap object and then I need to launch another Activity, How can I pass this Bitmap object from the sub-ac

10条回答
  •  情深已故
    2020-11-22 04:01

    Actually, passing a bitmap as a Parcelable will result in a "JAVA BINDER FAILURE" error. Try passing the bitmap as a byte array and building it for display in the next activity.

    I shared my solution here:
    how do you pass images (bitmaps) between android activities using bundles?

提交回复
热议问题