Search in sources :

Example 1 with CourseOpenAdapter

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);
        }
    });
}
Also used : CourseOpenAdapter(com.shu.studentmanager.adpater.CourseOpenAdapter) ArrayList(java.util.ArrayList) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) CourseTeacher(com.shu.studentmanager.entity.CourseTeacher)

Aggregations

LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)1 CourseOpenAdapter (com.shu.studentmanager.adpater.CourseOpenAdapter)1 CourseTeacher (com.shu.studentmanager.entity.CourseTeacher)1 ArrayList (java.util.ArrayList)1