鸿蒙OS开发文档 鸿蒙OS SlideDrawer.SlideDisable

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

SlideDrawer.SlideDisable

public static interface SlideDrawer.SlideDisable

允许实时禁用幻灯片。

方法总结

修饰符和类型方法描述
booleanshouldDisableSlide(SlideDrawer layout, SlideDrawer.SlideDirection direction, DragInfo info)调用以确定是否应禁用 SlideDrawer 上的当前幻灯片事件。

方法详情

shouldDisableSlide

boolean shouldDisableSlide(SlideDrawer layout, SlideDrawer.SlideDirection direction, DragInfo info)

调用以确定是否应禁用 SlideDrawer 上的当前幻灯片事件。

参数:

参数名称参数描述
info表示当前幻灯片事件的 DragInfo 信息。
layout指示发生滑动事件的 SlideDrawer。
direction指示滑动事件的方向。

返回:

如果应该拒绝幻灯片事件,则返回 true; 否则返回 false。