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;
    }
private int getPerPage ( Context context ) { return ( context . getResources ( ) . getDisplayMetrics ( ) . heightPixels / context . getResources ( ) . getDimensionPixelSize ( R . dimen . repo_item_height ) ) + 3 ; }
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