Search in sources :

Example 1 with CourseOpenedAdapter

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

the class OpenedFragment method setCourseSelectListRecycleview.

private void setCourseSelectListRecycleview() {
    course_opened_list_recycleview.setHasFixedSize(true);
    course_opened_list_recycleview.setLayoutManager(new LinearLayoutManager(getActivity()));
    courseOpenedAdapter = new CourseOpenedAdapter(getActivity());
    course_opened_list_recycleview.setAdapter(courseOpenedAdapter);
    openedViewModel.getMutableLiveData_student_select_course_list().observe(getActivity(), new Observer<ArrayList<CourseStudent>>() {

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

Aggregations

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