So there are members and all of them submits fee at monthly basis so I created separate reference for their fee records to make structure more flat.
under the "fee" the top level keys are the keys of member to which the records belong, so that i can query records for specific memebers and then inside it there are fee records which have their own key, so how do i query only the fee records.
because it want to pull the only fees data in a FirebaseRecyclerAdaper what i have done so far is.
Query baseQuery = FireBaseHandler.getInstance(getActivity()).getFeeReference();
FirebaseRecyclerOptions<FeeRecord> options = new FirebaseRecyclerOptions.Builder<FeeRecord>()
.setLifecycleOwner(this)
.setQuery(baseQuery,FeeRecord.class)
.build();
mAdapter = new FirebaseRecyclerAdapter<FeeRecord,Holder>(options) {
@Override
protected void onBindViewHolder(@NonNull final Holder holder, int i, @NonNull FeeRecord feeRecord) {
}
@NonNull
@Override
public Holder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
LayoutInflater inflater = LayoutInflater.from(getActivity());
return new Holder(inflater,parent);
}
But the baseQuery here only return everything under fee and send them to recycler adapter but it is returning only two children , which you can see why in the structure above . How do i get feeRecords inside these two children and lay them in the recycler view.
Or do you recommend changing the structure
Thanks in advanace