鸿蒙OS开发文档 鸿蒙OS ListComponent.OnComponentBoundStatusChangeListener

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

ListComponent.OnComponentBoundStatusChangeListener

public static interface ListComponent.OnComponentBoundStatusChangeListener

实现监听 ListComponent 的状态变化。

方法总结

修饰符和类型方法描述
voidonChildComponentBoundToWindow(Component component)当组件绑定到此 ListComponent 时调用。
voidonChildComponentUnboundFromWindow(Component component)当组件与此 ListComponent 解除绑定时调用。

方法详情

onChildComponentBoundToWindow

void onChildComponentBoundToWindow(Component component)

当组件绑定到此 ListComponent 时调用。

参数:

参数名称参数描述
component表示组件绑定。

onChildComponentUnboundFromWindow

void onChildComponentUnboundFromWindow(Component component)

当组件与此 ListComponent 解除绑定时调用。

参数:

参数名称参数描述
component表示组件未绑定。