Home » Java » java – I have populated the recyclerView with roll no, name and checkbox. I have a problem getting only Checked item from from the recyclerview-Exceptionshub

java – I have populated the recyclerView with roll no, name and checkbox. I have a problem getting only Checked item from from the recyclerview-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

As described above, I have populated the recyclerView with roll number, name and checkbox. I have a problem in getting only the checked item from the recyclerView

AdvancedRecycler.java

 firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Student, DataViewHolder>(options) {
                @Override
                protected void onBindViewHolder(@NonNull final DataViewHolder holder, final int position, @NonNull Student model) {
                    //final String rollno = model.getRoll();
                    //final String names = model.getName();
                    holder.rollTextView.setText("Roll no.: "+model.getRoll());
                    holder.nameTextView.setText(model.getName());
                    holder.attendanceBox.setChecked(true);
)};
How to&Answers: