Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Does not respond to screen size changes on external display #19

Open
chriswayg opened this issue Jun 4, 2021 · 3 comments
Open

Does not respond to screen size changes on external display #19

chriswayg opened this issue Jun 4, 2021 · 3 comments

Comments

@chriswayg
Copy link

chriswayg commented Jun 4, 2021

I was trying to use this to respond to screen size changes on an external display like a LCD projector.

react-native-responsive-dimensions does not seem to change font size on the external screen based on its dimensions or resolution.

Using GitHub - mybigday/react-native-external-display: React Native view renderer in External Display

(open the screenshots in separate tabs, as Github resizes the images)

640 x 480
image

1280 x 720
image

Expected result would have been that both screens would fit about the same amount of text with the font being bigger on the 1280 x 720 screen, but this did not happen.

Is there any way to make this work with the current version of react-native-responsive-dimensions?

SYSTEM INFO:
yarn run v1.22.5
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
Memory: 4.42 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.17.0 - /var/folders/9l/wwt6ljv10b9fhwjsybmw3d140000gn/T/yarn--1621697472231-0.6683796296679365/node
Yarn: 1.22.5 - /var/folders/9l/wwt6ljv10b9fhwjsybmw3d140000gn/T/yarn--1621697472231-0.6683796296679365/yarn
npm: 6.14.13 - ~/.nodenv/versions/14.17.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 23, 28, 29, 30
Build Tools: 28.0.2, 28.0.3, 29.0.2
System Images: android-23 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7322048
Xcode: 11.3.1/11C505 - /usr/bin/xcodebuild
Languages:
Java: 11.0.8 - /usr/bin/javac
Python: 3.7.7 - /Users/christian/.pyenv/shims/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Done in 3.15s.

@DaniAkash
Copy link
Member

@chriswayg are you using window dimensions or screen dimensions?

@chriswayg
Copy link
Author

@chriswayg are you using window dimensions or screen dimensions?

Screen dimensions, I suppose. - Since this would be used on projectors and other large screen devices such as TVs, its not the physical dimensions that I want to adjust to but I want a text to fill about 90% of the viewing area (especially horizontally), no matter if the resolution is 600 by 800 pixels or 4K. I can get screen resolution in pixels from react-native-external-display and calculate a scale factor based on that.

@DaniAkash
Copy link
Member

@chriswayg thanks for letting me know about react-native-external-display, i'll take a look into this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants