所以我试图检索存储在 Parse 中 PrescriptionArray 列中的值,这是一个数组。然后我想在 ListView lvPrescriptions 中显示这些值。任何帮助将不胜感激!!
ParseQuery<ParseObject> query = ParseQuery.getQuery("PrescriptionObject");
query.whereEqualTo("MedicalID", etMedicalID.getText().toString());
query.findInBackground(new FindCallback<ParseObject>() {
public void done(List<ParseObject> prescriptionList, ParseException e) {
if (e == null) {
final List<String> arrayprescription = new ArrayList<String>();
for (int i = 0; i < prescriptionList.size(); i++) {
ParseObject p = prescriptionList.get(i);
if (p.getList("PrescriptionArray") != null) {
arrayprescription.addAll(Arrays.asList("PrescriptionArray"));
ArrayAdapter adapter = new ArrayAdapter(PrescriptionsArrayActivity.this, android.R.layout.simple_list_item_1, arrayprescription);
lvPrescriptions.setAdapter(adapter);
}