You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that this repository seems to be for tvOS and may not be the right place to report issues about Android TV, although if that's the case, then I have no clue where to actually go for those issues. I'm actually a little frustrated by the TV support for RN because I thought React Native was supposed to automatically support all iOS/Android platforms without creating separate projects, but there seems to be a lot of fragmentation with TV platforms.
Description
When running an app created with this repo on Apple TV (tvOS) everything looks fine. However, when running the same app on Android TV / Fire TV nothing fits within the viewport; it looks like it's zoomed way in (see screenshots below).
Back then, I just created a completely separate project for Android, but I'm updating the app I built back then and am trying to get both tvOS and Android TV working off of the same code, instead of having to rewrite two apps.
When running, I can tell (via Dimensions.get('window')) that the screen dimensions are different:
Apple TV = 1920 x 1080
Fire TV = ~960 x 540
If this is not a bug, then how are React Native developers supposed to handle this? It seems like the options are:
Create two different apps, one for each platform.
Create separate StyleSheets to change component dimensions and font sizes depending on what device it's running on.
Maybe there is some way to auto scale the viewport on Android TV?
What is the recommended approach for this?
Environment
Amazon Fire TV Stick (Fire OS 5.2.6.3 / Android 5.1.1 Lollipop - 1080p @ 60Hz)
Apple TV (4th gen - tvOS 11.4 - 1080p @ 60Hz)
The issue is that because of the pixel density difference, you will need to pivot your font sizes and heights/widths between the two platforms.
Probably the easiest way to fix this is to define a scale constant in a component that all parts of your app can refer to. This is also needed when writing an app that has to work on both iOS and tvOS, where you need much bigger fonts for TV.
I understand that this repository seems to be for tvOS and may not be the right place to report issues about Android TV, although if that's the case, then I have no clue where to actually go for those issues. I'm actually a little frustrated by the TV support for RN because I thought React Native was supposed to automatically support all iOS/Android platforms without creating separate projects, but there seems to be a lot of fragmentation with TV platforms.
Description
When running an app created with this repo on Apple TV (tvOS) everything looks fine. However, when running the same app on Android TV / Fire TV nothing fits within the viewport; it looks like it's zoomed way in (see screenshots below).
I reported this issue several years ago before TV support was spun off from the core React Native project. Original issue is here: Android TV / tvOS scaling display inconsistency.
Back then, I just created a completely separate project for Android, but I'm updating the app I built back then and am trying to get both tvOS and Android TV working off of the same code, instead of having to rewrite two apps.
When running, I can tell (via
Dimensions.get('window')
) that the screen dimensions are different:If this is not a bug, then how are React Native developers supposed to handle this? It seems like the options are:
What is the recommended approach for this?
Environment
Amazon Fire TV Stick (Fire OS 5.2.6.3 / Android 5.1.1 Lollipop - 1080p @ 60Hz)
Apple TV (4th gen - tvOS 11.4 - 1080p @ 60Hz)
Packages:
Steps to Reproduce
Build and deploy any app to Apple TV and Fire TV Stick.
Expected Behavior
Both devices, when running at the same resolution (1080p @ 60Hz) should display the same.
Actual Behavior
On the Apple TV, everything looks perfect, but on the Fire TV Stick it looks like everything is super zoomed in and squished.
Apple TV:
Android TV / Fire TV:
The text was updated successfully, but these errors were encountered: