【发布时间】:2023-04-04 05:11:01
【问题描述】:
我正在尝试将数组列表传递回我的父活动
这是简单的代码。
private ArrayList<Receipt> receipts = new ArrayList<Receipt>();
Intent data = new Intent();
data. // what to do here?
setResult(RESULT_OK, data);
//************************************
这是基本收据类
public class Receipt {
public String referenceNo;
public byte[] image;
public String comments;
public Date createdOn;
public Date updatedOn;
告诉我如何将它添加到我的意图中,以及如何从
中将其从父活动中检索回来onActivityResult(final int requestCode, int resultCode, final Intent data)
【问题讨论】:
-
你检查过这个问题吗? -> stackoverflow.com/questions/5207510/…