databaseReference.child("user").addChildEventListener(new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {
String requests = postSnapshot.getValue(String.class);
req.add(requests);
adapter = new ChallengeSuggestionAdapter(getActivity(), req);
recyclerView.setAdapter(adapter);
}
}
感谢您的帮助:)我想从火力地堡用户阵列获取所有用户的UID,并将其存储到ArrayList中
有什么错误? –