openharmony 鸿蒙 arkts-apis-uicontext-i-sys

2026-08-25 浏览 (1)

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

NameTypeRead-OnlyOptionalDescription
samplingIntervalnumberNoYesColor sampling interval, in milliseconds. The minimum value is 180 ms.
Default value: 500
brightThresholdnumberNoYesLight 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
darkThresholdnumberNoYesDark 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
regionEdges<LengthMetrics>NoYesSample 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

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/URiRBRbH