pxToDp

fun Int.pxToDp(context: Context): Int

This method converts device specific pixels to density independent pixels.