MetricsUtils

open class MetricsUtils

Functions

Link copied to clipboard
open fun dipToPixel(@NonNull context: Context, dip: Float): Int
Link copied to clipboard
Link copied to clipboard
open fun getDensity(@NonNull context: Context): Float
Link copied to clipboard
open fun getDensityDpi(@NonNull context: Context): Int
Link copied to clipboard
open fun getDeviceWidth(@NonNull context: Context): Int
Link copied to clipboard
Link copied to clipboard
open fun getStatusBarHeight(@NonNull context: Context): Int
Link copied to clipboard
open fun pixelInDensity(@NonNull context: Context, pixel: Int): Int
Link copied to clipboard
open fun pixelInDensityF(@NonNull context: Context, pixel: Int): Float
Link copied to clipboard
open fun rotateRect(@NonNull originRect: RectF, pivotX: Float, pivotY: Float, degree: Double): RectF
Link copied to clipboard
open fun spToPixel(@NonNull context: Context, sp: Float): Float