鴻蒙OS Component.EstimateSizeListener

2022-09-07 09:30 更新

Component.EstimateSizeListener

  1. public static interface Component.EstimateSizeListener

提供用于自定義尺寸(寬度/高度)估計(jì)過程的界面。

方法總結(jié)

修飾符和類型 方法 描述
boolean onEstimateSize(int widthEstimateConfig, int heightEstimateConfig) 估計(jì)組件的大小以確定寬度和高度。

方法詳情

onEstimateSize

boolean onEstimateSize(int widthEstimateConfig, int heightEstimateConfig)

估計(jì)組件的大小以確定寬度和高度。

參數(shù):

參數(shù)名稱 參數(shù)描述
widthEstimateConfig 橫向尺寸要求。
heightEstimateConfig 垂直尺寸要求。

返回:

如果此組件在 onEstimateSize() 中處理了測量,則應(yīng)返回 True,并且無需在本機(jī)端開始測量,否則返回 false

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號