use of com.shu.studentmanager.adpater.CourseOpenAdapter in project student-manager by SYYANI.
the class OpenClassFragment method setCourseOpenListRecycleview.
private void setCourseOpenListRecycleview() {
course_open_list_recycleview.setHasFixedSize(true);
course_open_list_recycleview.setLayoutManager(new LinearLayoutManager(getActivity()));
courseOpenAdapter = new CourseOpenAdapter(getActivity());
course_open_list_recycleview.setAdapter(courseOpenAdapter);
openClassViewModel.getMutableLiveData_course_list().observe(getActivity(), new Observer<ArrayList<CourseTeacher>>() {
@Override
public void onChanged(ArrayList<CourseTeacher> courseTeachers) {
courseOpenAdapter.updateCourseList(courseTeachers);
}
});
}
Aggregations