package com.smaato.sdk.demoapp.utils;

import android.content.Context;
import android.support.annotation.NonNull;

public class SizeUtils {

    public static int dpsToPixels(@NonNull Context context, int dps) {
        // Get the screen's density scale
        float scale = context.getResources().getDisplayMetrics().density;
        // Convert the dps to pixels, based on density scale
        return  (int) (dps * scale + 0.5f);
    }

}
