Showing
1 changed file
with
6 additions
and
6 deletions
| @@ -78,12 +78,12 @@ ScreenUtil.init(context, designSize: Size(750, 1334), allowFontScaling: true); | @@ -78,12 +78,12 @@ ScreenUtil.init(context, designSize: Size(750, 1334), allowFontScaling: true); | ||
| 78 | ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //适配字体(根据系统的“字体大小”辅助选项来进行缩放) | 78 | ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //适配字体(根据系统的“字体大小”辅助选项来进行缩放) |
| 79 | ScreenUtil().setSp(24, allowFontScalingSelf: false) (sdk>=2.6 : 24.nsp) //适配字体(不会根据系统的“字体大小”辅助选项来进行缩放) | 79 | ScreenUtil().setSp(24, allowFontScalingSelf: false) (sdk>=2.6 : 24.nsp) //适配字体(不会根据系统的“字体大小”辅助选项来进行缩放) |
| 80 | 80 | ||
| 81 | - ScreenUtil.pixelRatio //设备的像素密度 | ||
| 82 | - ScreenUtil.screenWidth (sdk>=2.6 : 1.sw) //设备宽度 | ||
| 83 | - ScreenUtil.screenHeight (sdk>=2.6 : 1.sh) //设备高度 | ||
| 84 | - ScreenUtil.bottomBarHeight //底部安全区距离,适用于全面屏下面有按键的 | ||
| 85 | - ScreenUtil.statusBarHeight //状态栏高度 刘海屏会更高 单位dp | ||
| 86 | - ScreenUtil.textScaleFactor //系统字体缩放比例 | 81 | + ScreenUtil().pixelRatio //设备的像素密度 |
| 82 | + ScreenUtil().screenWidth (sdk>=2.6 : 1.sw) //设备宽度 | ||
| 83 | + ScreenUtil().screenHeight (sdk>=2.6 : 1.sh) //设备高度 | ||
| 84 | + ScreenUtil().bottomBarHeight //底部安全区距离,适用于全面屏下面有按键的 | ||
| 85 | + ScreenUtil().statusBarHeight //状态栏高度 刘海屏会更高 单位dp | ||
| 86 | + ScreenUtil().textScaleFactor //系统字体缩放比例 | ||
| 87 | 87 | ||
| 88 | ScreenUtil().scaleWidth // 实际宽度的dp与设计稿px的比例 | 88 | ScreenUtil().scaleWidth // 实际宽度的dp与设计稿px的比例 |
| 89 | ScreenUtil().scaleHeight // 实际高度的dp与设计稿px的比例 | 89 | ScreenUtil().scaleHeight // 实际高度的dp与设计稿px的比例 |
-
Please register or login to post a comment