Display and Layout (Fire TV)
Implementing an Android app that renders well on a television (or that behaves properly on both a tablet and a television) requires some attention to user interface layout.
This document provides technical information for building your UI layouts on the Amazon Fire TV platform. See Design and User Experience Guidelines for general guidelines on TV design.
Screen Size and Resolution
Many Android devices such as Fire tablets have a fixed physical size and a single resolution. This is not the case with Amazon Fire TV devices, to which you can connect a 720p or 1080p screen of any size.
The mechanism in Android to specify an activity layout in absolute coordinates independently of the video output resolution is to use density independent units (dp). Android scales the graphic resources so that the size remains constant independently of the screen resolution.
The following table shows the pixel size, density and display resolution for various video outputs connected to an Amazon Fire TV device.
TV setting | Output resolution (pixels) | Render surface (pixels) | Density identifier | screen density (dp) | Display resolution (dp) | Screen size identifier |
---|---|---|---|---|---|---|
1080p | 1920 x 1080 | 1920 x 1080 | xhdpi |
320 | 960x540 | large |
720p | 1280 x 720 | 1920 x 1080 | xhdpi |
320 | 960x540 | large |
480p | 640 x 480 | 1920 x 1080 | xhdpi |
320 | 960x540 | large |
Orientation
The orientation of the Amazon Fire TV device never changes, and requests for the rotation or orientation on the device return these results:
Method | Result |
---|---|
Display.getRotation() |
0 (ROTATION_0 ) |
Display.getOrientation() (deprecated) |
0 (ORIENTATION_UNDEFINED ) |
Resource Configurations
If you design your app to run on platforms other than Amazon Fire TV, such as tablets, you can create different layouts and drawables for each platform, and store them in subdirectories of res/
named for various platform and device configurations. For more information on using these resource configurations, see the Android best practices guide for Supporting Multiple Screens.
The following table describes the resource configurations available for the Amazon Fire TV platform.
Configuration | Value |
---|---|
Smallest width | sw540dp |
Available Width | w960dp |
Available Height | h540dp |
Screen Size | large |
Screen aspect | long |
Screen orientation | land (TV apps are always landscape) |
UI mode | television |
Night mode | notnight |
Screen pixel density | xhdpi |
Touchscreen type | notouch |
Keyboard availability | keyssoft |
Primary text input method | nokeys |
Navigation key availability | navexposed |
Primary non-touch navigation method | dpad |
Platform version | v17 |
Last updated: Oct 29, 2020