【发布时间】:2016-03-04 06:20:25
【问题描述】:
我有一个 ArrayList 文档,我想将此文件发送到另一个 Activity。但是如何在 SecondActivity 中获取这个值
我尝试的是 在第一个活动中
private ArrayList<File> documents;
Intent selectLabInt = new Intent(FirstActivity.this, SecondActivity.class);
selectLabInt.putExtra("patient_name", patientNameStr);
selectLabInt.putExtra("referal_notes", referalNotesStr);
selectLabInt.putExtra("fileList",documents);
startActivity(selectLabInt);
【问题讨论】:
-
patient_name,referal_notes,fileList的数据类型是什么?
-
字符串类型
-
@SabyaSachi
File类是否与java.io.File相同? -
所以你想传递字符串类型的数据或ArrayList的对象,即文档?
标签: android android-intent arraylist