use of com.instructure.canvasapi.model.CanvasContext in project instructure-android by instructure.
the class CourseListFragment method onRowClick.
@Override
public boolean onRowClick(CanvasContext item) {
Bundle bundle = new Bundle();
Section section = (Section) item;
section.getCourse_id();
CanvasContext course = courseGroupMap.get(section.getCourse_id());
bundle.putParcelable(Const.SECTION, item);
bundle.putParcelable(Const.COURSE, course);
bundle.putParcelableArrayList(Const.SECTION_PEOPLE, (ArrayList<User>) ((Section) item).getStudents());
if (nextFragment == Const.HOT_SEAT) {
StudentChooserFragment studentChooserFragment = new StudentChooserFragment();
studentChooserFragment.setArguments(bundle);
getParentActivity().swapFragment(studentChooserFragment, StudentChooserFragment.TAG);
} else if (nextFragment == Const.GUESS_WHO) {
GuessWhoFragment guessWhoFragment = new GuessWhoFragment();
guessWhoFragment.setArguments(bundle);
getParentActivity().swapFragment(guessWhoFragment, GuessWhoFragment.TAG);
} else if (nextFragment == Const.STUDENT_NOTES) {
StudentNotesFragment studentNotesFragment = new StudentNotesFragment();
studentNotesFragment.setArguments(bundle);
getParentActivity().swapFragment(studentNotesFragment, StudentNotesFragment.TAG);
}
return true;
}
Aggregations