ContextMenuController

Note:

Currently in the beta phase.

Provides the capability to control menu closure.

Note:

To use the following APIs, first obtain a ContextMenuController instance via the getContextMenuController() method from UIContext, then call the corresponding methods through this instance.

Import Module

import kit.ArkUI.*

class ContextMenuController

public class ContextMenuController {}

Description: Menu controller class.

System Capability: SystemCapability.ArkUI.ArkUI.Full

Since: 22

func close()

public func close(): Unit

Description: Closes the menu.

System Capability: SystemCapability.ArkUI.ArkUI.Full

Since: 22