鴻蒙OS Component.BindStateChangedListener

2022-09-06 09:35 更新

Component.BindStateChangedListener

public static interface Component.BindStateChangedListener

提供當組件綁定到其窗口或從其窗口分離時要調用的回調。

方法總結

修飾符和類型 方法 描述
void onComponentBoundToWindow(Component component) 當組件綁定到窗口時調用。
void onComponentUnboundFromWindow(Component component) 當組件與窗口解除綁定時調用。

方法詳情

onComponentBoundToWindow

void onComponentBoundToWindow(Component component)

當組件綁定到窗口時調用。

參數:

參數名稱 參數描述
component 表示已綁定到窗口的組件。

onComponentUnboundFromWindow

void onComponentUnboundFromWindow(Component component)

當組件與窗口解除綁定時調用。

參數:

參數名稱 參數描述
component 指示已從窗口分離的組件。
以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號