as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
useKeplerWindowDimensionsV2 returns the DisplayMetricsKepler entry for each surface that currently exists. DisplayMetricsKepler Type:
useKeplerWindowDimensionsV2 automatically updates values when the size of any surface changes. The following example shows how to get a surface window’s width and height:

Example

Properties

fontScale

The scale of the font currently used.

height

The height in pixels of the window or screen your app occupies.

scale

The pixel ratio of the device your app is running on. A value of 1 indicates PPI/DPI of 96 (76 on some platforms). 2 indicates a Retina or high DPI display.

width

The width in pixels of the window or screen your app occupies.

rootTag

The unique root tag for the surface that corresponds with this entry. Root tag also takes care of multiple instances of the same interactive component to be able to uniquely identify each instance.
最后修改于 2026年10月26日