#0.7.0
- Replace textScaleFactory with textScaleFactor , It's a typo.
- Add return types to all methods.
- Completing comments , adding English commentsWelcome to add, correct
- 参数同时支持传入 int / double 或者是var size = 100 , var size = 100.0.
- The argument also supports passing in in / double / var size = 100 /var size = 100.0
- Change the units of statusBarHeight and bottomBarHeight to dp
-
Change the parameter type from int to double
-
setWidth,setHeight,setSp. for example: you can use setWidth(100) or setWidth(100.0)
-
Fix the wrong way of using
-
It is recommended to use
ScreenUtil.getInstance()
instead ofScreenUtil()
, for example:ScreenUtil.getInstance().setHeight(25)
instead ofScreenUtil().setHeight(25)
- Fix bugs that default fonts change with the system
-
Modify the font to change with the system zoom mode. The default value is false.
-
setSp(int fontSize, [allowFontScaling = false]) => allowFontScaling ? setWidth(fontSize) * _textScaleFactor : setWidth(fontSize);
-
add two Properties
-
///Current device width dp
-
///当前设备宽度 dp
-
ScreenUtil.screenWidthDp
-
///Current device height dp
-
///当前设备高度 dp
-
ScreenUtil.screenHeightDp
- Fix font adaptation issues
- Optimize font adaptation method
- Perfect documentation
- Width is enlarged relative to the design draft => The ratio of font and width to the size of the design
- Height is enlarged relative to the design draft => The ratio of height width to the size of the design
- Add font size adaptation
- Optimize documentation
- Fixed bug when releasing
- first version