1e41f4b71Sopenharmony_ci# @ohos.app.ability.ConfigurationConstant (ConfigurationConstant) 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciConfigurationConstant模块提供配置信息枚举值定义的能力。 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **说明:** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci## 导入模块 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci```ts 12e41f4b71Sopenharmony_ciimport { ConfigurationConstant } from '@kit.AbilityKit'; 13e41f4b71Sopenharmony_ci``` 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci## ColorMode 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci表示颜色模式的枚举。 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci**原子化服务API:** 从API version 11开始,该接口支持在原子化服务中使用。 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.Ability.AbilityBase 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci| 名称 | 值 | 说明 | 24e41f4b71Sopenharmony_ci| -------- | -------- | -------- | 25e41f4b71Sopenharmony_ci| COLOR_MODE_NOT_SET | -1 | 未设置颜色模式。 | 26e41f4b71Sopenharmony_ci| COLOR_MODE_DARK | 0 | 深色模式。 | 27e41f4b71Sopenharmony_ci| COLOR_MODE_LIGHT | 1 | 浅色模式。 | 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci## Direction 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci表示屏幕方向的枚举。 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci**原子化服务API:** 从API version 11开始,该接口支持在原子化服务中使用。 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.Ability.AbilityBase 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ci| 名称 | 值 | 说明 | 39e41f4b71Sopenharmony_ci| -------- | -------- | -------- | 40e41f4b71Sopenharmony_ci| DIRECTION_NOT_SET | -1 | 未设置方向。 | 41e41f4b71Sopenharmony_ci| DIRECTION_VERTICAL | 0 | 垂直方向。 | 42e41f4b71Sopenharmony_ci| DIRECTION_HORIZONTAL | 1 | 水平方向。 | 43e41f4b71Sopenharmony_ci 44e41f4b71Sopenharmony_ci 45e41f4b71Sopenharmony_ci## ScreenDensity 46e41f4b71Sopenharmony_ci 47e41f4b71Sopenharmony_ci表示屏幕像素的枚举。 48e41f4b71Sopenharmony_ci 49e41f4b71Sopenharmony_ci**原子化服务API:** 从API version 11开始,该接口支持在原子化服务中使用。 50e41f4b71Sopenharmony_ci 51e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.Ability.AbilityBase 52e41f4b71Sopenharmony_ci 53e41f4b71Sopenharmony_ci| 名称 | 值 | 说明 | 54e41f4b71Sopenharmony_ci| -------- | -------- | -------- | 55e41f4b71Sopenharmony_ci| SCREEN_DENSITY_NOT_SET | 0 | 未设置屏幕像素密度。 | 56e41f4b71Sopenharmony_ci| SCREEN_DENSITY_SDPI | 120 | 屏幕像素密度为'SDPI'。 | 57e41f4b71Sopenharmony_ci| SCREEN_DENSITY_MDPI | 160 | 屏幕像素密度为'MDPI'。 | 58e41f4b71Sopenharmony_ci| SCREEN_DENSITY_LDPI | 240 | 屏幕像素密度为'LDPI'。 | 59e41f4b71Sopenharmony_ci| SCREEN_DENSITY_XLDPI | 320 | 屏幕像素密度为'XLDPI'。 | 60e41f4b71Sopenharmony_ci| SCREEN_DENSITY_XXLDPI | 480 | 屏幕像素密度为'XXLDPI'。 | 61e41f4b71Sopenharmony_ci| SCREEN_DENSITY_XXXLDPI | 640 | 屏幕像素密度为'XXXLDPI'。 | 62