Search in sources :

Example 1 with StudentCourseSelectAdapter

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

the class CourseSelectFragment method setCourseSelectListRecycleview.

private void setCourseSelectListRecycleview() {
    course_select_list_recycleview.setHasFixedSize(true);
    course_select_list_recycleview.setLayoutManager(new LinearLayoutManager(getActivity()));
    studentCourseSelectAdapter = new StudentCourseSelectAdapter(getActivity());
    course_select_list_recycleview.setAdapter(studentCourseSelectAdapter);
    courseSelectViewModel.getMutableLiveData_student_select_course_list().observe(getActivity(), new Observer<ArrayList<CourseStudent>>() {

        @Override
        public void onChanged(ArrayList<CourseStudent> courseStudents) {
            studentCourseSelectAdapter.updateCourseSelectList(courseStudents);
        }
    });
}
Also used : StudentCourseSelectAdapter(com.shu.studentmanager.adpater.StudentCourseSelectAdapter) CourseStudent(com.shu.studentmanager.entity.CourseStudent) ArrayList(java.util.ArrayList) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager)

Aggregations

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