You'll need to join the data, by attaching a addListenerForSingleValueEvent()
.
FirebaseRecyclerViewAdapter adapter = new FirebaseRecyclerViewAdapter(
Boolean.class, android.R.layout.two_line_list_item, ItemViewHolder.class, friendsRef){
protected void populateViewHolder(final ItemViewHolder viewHolder, Boolean model, int position) {
String key = this.getRef(position).getKey();
ref.child("users").child(key).addListenerForSingleValueEvent(new ValueEventListener() {
public void onDataChange(DataSnapshot dataSnapshot) {
String name = dataSnapshot.child("name").getValue(String.class);
((TextView)viewHolder.itemView.findViewById(android.R.id.text1)).setText(name);
}
public void onCancelled(FirebaseError firebaseError) { }
});
}
};
I've added an activity Activity36235919 to demonstrate this to my sample repo.
After making it work I realized that I'd answered this before in Coupling FirebaseRecyclerViewAdapter to a Boolean/String Map.Entry, so I'll mark your question as a duplicate.