Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
Ring
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
メインコンテンツへスキップ
useKeplerWindowDimensions returns an array of DisplayMetricsKepler entries for each surface that currently exists. DisplayMetricsKepler Type:
useKeplerWindowDimensions automatically updates values when any surface’s size changes. To get a surface window’s width and height use the width and height properties:
The available array indexes depends on the number of surfaces that exist. If there is no surface the array is empty. If there is only one surface, the index for that surface is zero (0). If there are multiple surfaces, the array has an entry for each surface. The moduleName property for each entry matches the AppRegistry name for the app component that corresponds to a surface.

Example

Properties

fontScale

The scale of the font currently used. Some operating systems allow users to scale their font sizes larger or smaller for reading comfort. This prop allows you to determin what the current font scale is. The available array indexes depends on the number of surfaces that exist.

height

The height in pixels of the window or screen that your app occupies. The available array indexes depends on the number of surfaces that exist.

scale

The pixel ratio of the device that your app is running on. The available array indexes depends on the number of surfaces that exist.
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 that your app occupies. The available array indexes depends on the number of surfaces that exist.

moduleName

The name of the module for the surface that corresponds with this entry. The available array indexes depends on the number of surfaces that exist.
最終更新日 2026年10月26日