Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
Ring
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
メインコンテンツへスキップ
useWindowDimensions automatically updates all of its values when screen size or font scale changes.
The following snippet show how to get your app’ window width and height like so:

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 property will let you know what is in effect.

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. The values can be:
  • 1 which indicates that one point equals one pixel (usually PPI/DPI of 96, 76 on some platforms).
  • 2 or 3 which indicates a Retina or high DPI display.

width

The width in pixels of the window or screen your app occupies.
最終更新日 2026年10月26日