鸿蒙OS开发文档 鸿蒙OS Component.EstimateSizeListener

2024-02-25 开发教程 鸿蒙OS开发文档 匿名 0

Component.EstimateSizeListener

public static interface Component.EstimateSizeListener

提供用于自定义尺寸(宽度/高度)估计过程的界面。

方法总结

修饰符和类型方法描述
booleanonEstimateSize(int widthEstimateConfig, int heightEstimateConfig)估计组件的大小以确定宽度和高度。

方法详情

onEstimateSize

boolean onEstimateSize(int widthEstimateConfig, int heightEstimateConfig)

估计组件的大小以确定宽度和高度。

参数:

参数名称参数描述
widthEstimateConfig横向尺寸要求。
heightEstimateConfig垂直尺寸要求。

返回:

如果此组件在 onEstimateSize() 中处理了测量,则应返回 True,并且无需在本机端开始测量,否则返回 false