-
public final class ScreenExtensionKt
-
-
Method Summary
Modifier and Type Method Description final static IntegergetScreenWidth(Context $self)获得屏幕宽度 final static IntegergetScreenHeight(Context $self)获得屏幕高度(不包含状态栏、导航栏) final static IntegergetStatusHeight(Context $self)获得状态栏的高度 final static IntegergetRealScreenHeight(Activity $self)获取整块屏幕的高度 final static IntegergetNavigationAreaHeight(Activity $self)获取虚拟按键区域的高度 final static IntegergetNavigationBarrH(Context $self)获取导航栏高度 final static BitmapsnapShotWithStatusBar(Activity $self)获取当前屏幕截图,包含状态栏 final static BitmapsnapShotWithoutStatusBar(Activity $self)获取当前屏幕截图,不包含状态栏 final static IntegergetTitleBarHeight(Activity $self)获得标题栏高度 final static IntegergetStatusBarHeight(Context $self)获取通知栏高度,沉浸栏高度 final static IntegergetScreenDpi()获取屏幕分辨率 final static BooleangetDarkModeStatus(Context $self)检查当前系统是否已开启暗黑模式 -
-
Method Detail
-
getScreenWidth
final static Integer getScreenWidth(Context $self)
获得屏幕宽度
-
getScreenHeight
final static Integer getScreenHeight(Context $self)
获得屏幕高度(不包含状态栏、导航栏)
-
getStatusHeight
final static Integer getStatusHeight(Context $self)
获得状态栏的高度
-
getRealScreenHeight
final static Integer getRealScreenHeight(Activity $self)
获取整块屏幕的高度
-
getNavigationAreaHeight
final static Integer getNavigationAreaHeight(Activity $self)
获取虚拟按键区域的高度
-
getNavigationBarrH
final static Integer getNavigationBarrH(Context $self)
获取导航栏高度
-
snapShotWithStatusBar
final static Bitmap snapShotWithStatusBar(Activity $self)
获取当前屏幕截图,包含状态栏
-
snapShotWithoutStatusBar
final static Bitmap snapShotWithoutStatusBar(Activity $self)
获取当前屏幕截图,不包含状态栏
-
getTitleBarHeight
final static Integer getTitleBarHeight(Activity $self)
获得标题栏高度
-
getStatusBarHeight
final static Integer getStatusBarHeight(Context $self)
获取通知栏高度,沉浸栏高度
-
getScreenDpi
final static Integer getScreenDpi()
获取屏幕分辨率
-
getDarkModeStatus
final static Boolean getDarkModeStatus(Context $self)
检查当前系统是否已开启暗黑模式
-
-
-
-