控制字体是否要根据系统的“字体大小”辅助选项来进行缩放。默认值为false。
allowFontScaling Specifies whether fonts should scale to respect Text Size accessibility settings. The default is false.
设置Height
根据UI设计的设备高度适配
当发现UI设计中的一屏显示的与当前样式效果不符合时,
或者形状有差异时,建议使用此方法实现高度适配.
高度适配主要针对想根据UI设计的一屏展示一样的效果
Highly adaptable to the device according to UI Design
It is recommended to use this method to achieve a high degree of adaptation
when it is found that one screen in the UI design
does not match the current style effect, or if there is a difference in shape.
setSp(numfontSize, {boolallowFontScalingSelf = false})
→ num
字体大小适配方法
@param fontSize UI设计上字体的大小,单位px.
Font size adaptation method
@param fontSize The size of the font on the UI design, in px.
@param allowFontScaling
设置Height(流式布局)
scaleHeight 0 - 1 ,可以是小数
根据UI设计的设备高度适配
当发现UI设计中的一屏显示的与当前样式效果不符合时,
或者形状有差异时,建议使用此方法实现高度适配.
高度适配主要针对想根据UI设计的一屏展示一样的效果
Highly adaptable to the device according to UI Design
It is recommended to use this method to achieve a high degree of adaptation
when it is found that one screen in the UI design
does not match the current style effect, or if there is a difference in shape.
设置Width(流式布局)
scaleWidth 0 - 1 ,可以是小数
根据UI设计的设备宽度适配
高度也可以根据这个来做适配可以保证不变形,比如你先要一个正方形的时候.
Adapted to the device width of the UI Design.
Height can also be adapted according to this to ensure no deformation ,
if you want a square
设置Width
根据UI设计的设备宽度适配
高度也可以根据这个来做适配可以保证不变形,比如你先要一个正方形的时候.
Adapted to the device width of the UI Design.
Height can also be adapted according to this to ensure no deformation ,
if you want a square