package library.ext

import android.content.Context

fun Int?.dp2px(context: Context): Int?  {

    val scale = context.resources.displayMetrics.density;
    return this?.times(scale)?.plus(0.5f)?.toInt();

}