Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. @Override
  2. public int getItemCount() {
  3. switch (STATE) {
  4. case BOTH:
  5. // if both, return 2 additional for header & footerResource
  6. return list.length + 2;
  7. case ITEM:
  8. // if just items, return just the length
  9. return list.length;
  10. default:
  11. // if either or, return 1 additional
  12. return list.length + 1;
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement