harmony(鸿蒙)Configuration

2022-08-09 浏览 (797)

Configuration

The Configuration module provides environment configuration information.

NOTE

The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Modules to Import

import Configuration from '@ohos.application.Configuration';

Attributes

System capability: SystemCapability.Ability.AbilityBase

NameTypeReadableWritableDescription
languagestringYesYesLanguage of the application.
colorModeColorModeYesYesColor mode, which can be COLOR_MODE_LIGHT or COLOR_MODE_DARK. The default value is COLOR_MODE_LIGHT.
direction9+DirectionYesNoScreen orientation, which can be DIRECTION_HORIZONTAL or DIRECTION_VERTICAL.
screenDensity9+ScreenDensityYesNoScreen resolution, which can be SCREEN_DENSITY_SDPI (120), SCREEN_DENSITY_MDPI (160), SCREEN_DENSITY_LDPI (240), SCREEN_DENSITY_XLDPI (320), SCREEN_DENSITY_XXLDPI (480), or SCREEN_DENSITY_XXXLDPI (640).
displayId9+numberYesNoID of the display where the application is located.
hasPointerDevice9+booleanYesNoWhether a pointer device, such as a keyboard, mouse, or touchpad, is connected.

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)APIs

harmony(鸿蒙)API Reference Document Description

harmony(鸿蒙)BundleStatusCallback

harmony(鸿蒙)@ohos.bundle.innerBundleManager

harmony(鸿蒙)distributedBundle

harmony(鸿蒙)@ohos.bundle

harmony(鸿蒙)@ohos.enterprise.EnterpriseAdminExtensionAbility

harmony(鸿蒙)Work Scheduler Callbacks

harmony(鸿蒙)@ohos.ability.ability

harmony(鸿蒙)AbilityContext

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