Search in sources :

Example 1 with ScoreStudentAdapter

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

the class ScoreReviewFragment method setScoreListRecyclerview.

private void setScoreListRecyclerview() {
    score_review_list_recyclerview.setHasFixedSize(true);
    score_review_list_recyclerview.setLayoutManager(new LinearLayoutManager(getActivity()));
    scoreStudentAdapter = new ScoreStudentAdapter(getActivity());
    score_review_list_recyclerview.setAdapter(scoreStudentAdapter);
    scoreReviewViewModel.getMutableLiveData_score_review_score_list().observe(getActivity(), new Observer<ArrayList<Course>>() {

        @Override
        public void onChanged(ArrayList<Course> courses) {
            scoreStudentAdapter.updateScoreStudentList(courses);
        }
    });
}
Also used : ScoreStudentAdapter(com.shu.studentmanager.adpater.ScoreStudentAdapter) ArrayList(java.util.ArrayList) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) Course(com.shu.studentmanager.entity.Course)

Aggregations

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