我想从给定的引用中访问章节名称。
databaseReferenceGetChapter = FirebaseDatabase.getInstance().getReference(mAuth.getCurrentUser().getUid()).child("chapter").child(subjectId);
databaseReferenceGetChapter.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
progressBar.setVisibility(View.GONE);
chapterList.clear();
for (DataSnapshot courseSnapshot: dataSnapshot.getChildren()){
Chapter chapter = courseSnapshot.getValue(Chapter.class);
chapterList.add(chapter);
}
ChapterList adapterChapter = new ChapterList(AddQuestion.this,R.layout.list_layout,chapterList);
spinnerChapter.setAdapter(adapterChapter);
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});[this my realtime data base and i want to access intro to java chapter][1]