Search in sources :

Example 1 with CourseManageAdapter

use of com.shu.studentmanager.adpater.CourseManageAdapter in project student-manager by SYYANI.

the class ManageCourseFragment method setCourseOpenListRecycleview.

private void setCourseOpenListRecycleview() {
    course_manage_list_recycleview.setHasFixedSize(true);
    course_manage_list_recycleview.setLayoutManager(new LinearLayoutManager(getActivity()));
    courseManageAdapter = new CourseManageAdapter(getActivity());
    course_manage_list_recycleview.setAdapter(courseManageAdapter);
    manageCourseViewModel.getMutableLiveData_course_list().observe(getActivity(), new Observer<ArrayList<CourseTeacher>>() {

        @Override
        public void onChanged(ArrayList<CourseTeacher> courseTeachers) {
            courseManageAdapter.updateCourseList(courseTeachers);
        }
    });
}
Also used : CourseManageAdapter(com.shu.studentmanager.adpater.CourseManageAdapter) ArrayList(java.util.ArrayList) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) CourseTeacher(com.shu.studentmanager.entity.CourseTeacher)

Aggregations

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