public static int toPixels(Resources res, float dp) {
        return (int) (dp * res.getDisplayMetrics().density);
    }
Converts dp to px

@param res Resources
@param dp  the value in dp
@return int
android/third_party/recyclerview-fastscroll/src/main/java/com/simplecityapps/recyclerview_fastscroll/utils/Utils.java