-1

How to hide RecyclerView footer while list is empty and show it again when list has some items?

I implemented footer according to this answer

Community
  • 1
  • 1
madim
  • 774
  • 10
  • 22

1 Answers1

2

I did check it in getItemCount

@Override
public int getItemCount() {
    if (list.isEmpty()) return 0;
    else return list.size() + 1;
}
madim
  • 774
  • 10
  • 22