my app is an agenda using Firebase(Real time Data)and Recycler View. When I choose the day from Calendar View it opens MainActivity3. In MainActivity3 I can add a new event(with time, title) and above that a Recycler view(Card view) with the information of the events. In the Recycler View I show to the date, the creator of event, title, time(I have also participants but I don't use it yet).
I want to show the followings in the Recycler View:
- The events for the specific day I choose
- The events if I am the creator(if another user login to the app and choose this date he will see only his events and not mine)
How I am going to do it? I try to use Query in Mainactivity3 for date:
Query querydate = mbase.orderByChild("date").equalTo(datequery);
FirebaseRecyclerOptions<events> options = new FirebaseRecyclerOptions.Builder<events>()
.setQuery(querydate, events.class)
.build();
kadapter = new kAdapter(options);
recyclerView.setAdapter(kadapter);
This show me the right event for the date but I have to combine the creator and I have a problem.(//Query queryemail = mbase.orderByChild("email").equalTo(emailquery);
)
I want 1 query with 2 properties (date, creator). How I am supposed to do that?