use of com.shu.studentmanager.adpater.StudentAdapter in project student-manager by SYYANI.
the class ManageStudentFragment method setStudentListRecycleview.
private void setStudentListRecycleview() {
student_list_recyclerview.setHasFixedSize(true);
student_list_recyclerview.setLayoutManager(new LinearLayoutManager(getActivity()));
studentAdapter = new StudentAdapter(getActivity());
student_list_recyclerview.setAdapter(studentAdapter);
manageStudentViewModel.getMutableLiveData_manage_student_list().observe(getActivity(), new Observer<ArrayList<Student>>() {
@Override
public void onChanged(ArrayList<Student> students) {
studentAdapter.updateStudentList(students);
}
});
}
Aggregations