Interfaces (Others) (System API)
NOTE
The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
In the following API examples, you must first use getUIContext() in @ohos.window to obtain a UIContext instance, and then call the APIs using the obtained instance. Alternatively, you can obtain a UIContext instance through the built-in method getUIContext() of the custom component. In this document, the UIContext instance is represented by uiContext.
This document describes only system APIs provided by the module. For details about other public APIs, see Interfaces (Others).
BackgroundLuminanceSamplingConfigs23+
Sets the background luminance sampling parameters.
Atomic service API: This API can be used in atomic services since API version 23.
Model constraint: This API can be used only in the stage model.
System API: This is a system API.
System capability: SystemCapability.ArkUI.ArkUI.Full
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| samplingInterval | number | No | Yes | Color sampling interval, in milliseconds. The minimum value is 180 ms. Default value: 500 |
| brightThreshold | number | No | Yes | Light color brightness threshold. The value must be an integer in the range of [0, 255]. The dark color brightness threshold must be less than the light color brightness threshold. Default value: 220 |
| darkThreshold | number | No | Yes | Dark color brightness threshold. The value must be an integer in the range of [0, 255]. The dark color brightness threshold must be less than the light color brightness threshold. Default value: 150 |
| region | Edges<LengthMetrics> | No | Yes | Sample area offset relative to the component, calculated from the component's upper left corner as the reference point. The component's own area is used by default. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 arkts-apis-uicontext-contextmenucontroller
openharmony 鸿蒙 errorcode-canvas
openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent
openharmony 鸿蒙 errorcode-bindSheet
openharmony 鸿蒙 js-apis-arkui-uiExtension-sys
openharmony 鸿蒙 capi-arkui-accessibility-arkui-accessibilityeventinfo
openharmony 鸿蒙 capi-arkui-rendernodeutils
openharmony 鸿蒙 js-apis-arkui-node
openharmony 鸿蒙 capi-native-node-h
openharmony 鸿蒙 capi-arkui-nativemodule-arkui-listitemswipeactionitem