Search in sources :

Example 1 with ScoreTeacherAdapter

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

the class ScoreManageFragment method setScoreListRecyclerview.

private void setScoreListRecyclerview() {
    score_list_recyclerview.setHasFixedSize(true);
    score_list_recyclerview.setLayoutManager(new LinearLayoutManager(getActivity()));
    scoreTeacherAdapter = new ScoreTeacherAdapter(getActivity());
    score_list_recyclerview.setAdapter(scoreTeacherAdapter);
    scoreManageViewModel.getMutableLiveData_score_list().observe(getActivity(), new Observer<ArrayList<ScoreTeacher>>() {

        @Override
        public void onChanged(ArrayList<ScoreTeacher> scoreTeachers) {
            scoreTeacherAdapter.updateScoreTeacherList(scoreTeachers);
        }
    });
}
Also used : ScoreTeacherAdapter(com.shu.studentmanager.adpater.ScoreTeacherAdapter) ArrayList(java.util.ArrayList) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) ScoreTeacher(com.shu.studentmanager.entity.ScoreTeacher)

Aggregations

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