I have two ParseObjects: Trip and Schedule. Trip has an "assignedSchedule" column which points to a Schedule ParseObject. I get all rows of Trip and display them as a listview:
ParseQuery<ParseObject> trip = ParseQuery.getQuery("Trip");
trip.include("assignedSchedule");
trip.findInBackground(new FindCallback<ParseObject>() {
public void done(List<ParseObject> list, ParseException e) {
if (e == null) {
ListView lv = (ListView) rootView.findViewById(R.id.schedule);
SampleCustomAdapter adapter = new SampleCustomAdapter(list);
lv.setTextFilterEnabled(true);
lv.setAdapter(adapter2);
So, my custom adapter takes in an arrayList of Trip and display them as views. I need the "day" and "time" which are columns of Schedule. How do I get them? I keep finding:
var day = result[i].get("assignedSchedule").get("day");
or something similar as the solution but this is for javascript. It doesn't seem to work on android. I do this:
ParseObject schedule = list.get(index);
schedule.get("assignedSchedule").get("day");
By the second .get, it says that it cannot resolve the method. I tried turning it into an array instead of an arrayList, tried to instantiate it as an Object instead of a ParseObject but it still gets the same error
Any suggestions would be awesome!