DisplayUtil

Functions

Link copied to clipboard
open fun dip2px(dpValue: Float): Int
dp 转换成像素
Link copied to clipboard
open fun getWindowWidth(activity: Activity): Float
获取指定 Window 的宽度
Link copied to clipboard
open fun px2dip(pxValue: Float): Int
将像素转换成 dp
Link copied to clipboard
open fun sp2px(spValue: Float): Int
将sp值转换为px值,保证文字大小不变