use of com.shu.studentmanager.adpater.TeacherAdapter in project student-manager by SYYANI.
the class ManageTeacherFragment method setTeacherListRecycleview.
private void setTeacherListRecycleview() {
teacher_list_recyclerview.setHasFixedSize(true);
teacher_list_recyclerview.setLayoutManager(new LinearLayoutManager(getActivity()));
teacherAdapter = new TeacherAdapter(getActivity());
teacher_list_recyclerview.setAdapter(teacherAdapter);
manageTeacherViewModel.getMutableLiveData_manage_teacher_list().observe(getActivity(), new Observer<ArrayList<Teacher>>() {
@Override
public void onChanged(ArrayList<Teacher> teachers) {
teacherAdapter.updateStudentList(teachers);
}
});
}
Aggregations