Android Resource ID for High Resolution Phones and Google TVs

What resource identifier can I use for Google TV to distinguish it from phones like Galaxy S3, layout-sw720dp does not work?

+4
source share
3 answers

I tried tvdpi, but unfortunately the Galaxy S3 was collecting its resources. I ended up using a layout and a layout for resources. Nexus and Google TV get their resources from the layout, and the Galaxy S3 gets their resources from the layout. Thanks.

0
source

You can use tvdpi :

Resources for screens somewhere between mdpi and hdpi; approximately 213dpi. This is not considered a β€œprimary” density group. It is mainly designed for TVs and most applications, does not need it - providing mdpi and hdpi resources are sufficient for most applications and the system will scale them as needed. If you deem it necessary to provide tvdpi resources, you should have a size of 1.33 * mdpi. For example, a 100px x 100px image for mdpi screens should be 133px x 133px for tvdpi.

+1
source

TV settings Address screen size (in pixels) Density screen density (in dp format) Screen resolution (in dp format) Screen size identifier

  • 720p 1280 x 720 px tvdpi 213 960 x 540 large

  • 1080p 1920 x 1080 px xhdpi 320 960 x 540 large

This is from: https://developers.google.com/tv/android/docs/gtv_android_patterns

More information on the displayed guide: https://developers.google.com/tv/android/docs/gtv_displayguide

0
source

Source: https://habr.com/ru/post/1439891/


All Articles