0

I have two FirebaseRecyclerAdapters, one gets all the listattendees and the other gets all the people on the platform. I want the second FirebaseRecyclerAdapter to not show the people who are already a listattendee (so basicly all people minus people from the first adapter). Is it possible to query the second adapter with the table of the first ? Something like this:

        FirebaseRecyclerAdapter<Boolean, FriendsFragment.FriendsViewHolder> friendsRecyclerViewAdapter = new FirebaseRecyclerAdapter<Boolean, FriendsFragment.FriendsViewHolder>(
            Boolean.class,
            R.layout.users_single_layout,
            FriendsFragment.FriendsViewHolder.class,
            mFriendsDatabase (query where id not match that of mListAttendees?)
    )  {

The mListAttendees also works with the boolean.class.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
2hTu2
  • 378
  • 4
  • 19

1 Answers1

2

There is nothing built into FirebaseUI for that, and the Firebase Database query model does not support "not in" type queries.

The simplest I can think of is to hide duplicate items, such as shown here: How to hide an item from Recycler View on a particular condition?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807