its really great project.
since I tried to implement the same code on my project, i got error in FirebaseRecyclerAdapter line(172). I couldn't use populateViewHolder, because firebase already asked me to implement the methods, and once i implemet them, it asking me to return something or it will stay as error line.
FirebaseRecyclerAdapter<Events, myViewHolder> adapter = new FirebaseRecyclerAdapter<Events, myViewHolder>(Events.class, R.layout.data_item, myViewHolder.class, databaseReference) {
@NonNull
@Override
public myViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return null;
}
@Override
protected void onBindViewHolder(@NonNull myViewHolder holder, int position, @NonNull Events model) {
}
protected void populateViewHolder(myViewHolder myViewHolder, final Events data, final int i) {
myViewHolder.setDate(data.getEventDate());
myViewHolder.setType(data.getEventName());
// myViewHolder.setAmount(model.getmAmount());
myViewHolder.setNote("note: " + data.getEventDesc());
myViewHolder.view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// save the current ref and inputs to view inside update dialog
name = data.getEventName();
// amount = model.getmAmount();
desc = data.getEventDesc();
updateData();
}
});
}
};
recyclerView.setAdapter(adapter);
}`