code: private int getPerPage(Context context) {
          //fixed item size in recyclerview. Adding 3 enables recyclerview scrolling.
          return (context.getResources().getDisplayMetrics().heightPixels
                  / context.getResources().getDimensionPixelSize(R.dimen.repo_item_height)) + 3;
      }
docs: Get items to load per page onScroll.
  @param context {@link Context}
  @return int of num of items that can be loaded onto the screen with scroll enabled