Giter Site home page Giter Site logo

react-native-toolkit / react-native-responsive-dimensions Goto Github PK

View Code? Open in Web Editor NEW
474.0 9.0 39.0 3.63 MB

Resposive fontSize, height and width for react-native components, that automatically adjusts itself based on screen-size of the device.

Home Page: https://www.npmjs.com/package/react-native-responsive-dimensions

License: MIT License

JavaScript 11.86% TypeScript 80.40% Shell 7.75%
react-native responsive react-native-component font-size dimensions responsive-design hacktoberfest

react-native-responsive-dimensions's People

Contributors

ashishpandey001 avatar beginci avatar daniakash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-responsive-dimensions's Issues

Android support

Nice job on iOS !

Is Android is support by this package ?

responsiveFontSize() not working on samsung glaxy note 8

for ios its working fine below is screenshot
simulator screen shot - iphone 6 - 2018-04-25 at 14 54 46

but for androd its not working only on this device
screenshot_20180423-134218

Device specification :-

Resolution | 1440 x 2960 pixels, 18.5:9 ratio (~521 ppi density)
Size | 6.3 inches, 101.1 cm2ย (~83.2% screen-to-body ratio)

Debounce Responsive hooks?

Hi, would it be possible to add a debounce to the responsive hooks, so the number of re-renders per time is limited?

At the moment the hook is firing very often during resizing the browser window or rotating the device, causing a lot of re-rendering.

Missing declaration file

I am receiving an error when I try to import this that says "Could not find a declaration file for module 'react-native-responsive-dimensions". ' implicitly has an 'any' type. Try 'npm install @types/react-native-responsive-dimensions' if it exists or add a new declaration (.d.ts) file containing 'declare module 'react-native-responsive-dimensions';'

RN method roundToNearestPixel is not used

Hi @DaniAkash,

your solution is good, I use a very similar one for my RN projects. The difference from my solution is that I use roundToNearestPixel RN method that rounds a layout size (dp) to the nearest layout size that corresponds to an integer number of pixels. And I was about to create a npm package of my own until I saw yours.

I would be happy to provide a PR, if you are actively maintaining this package :)

Thanks

update release on npm

Hello,

It has been a long time since you merged in my PR, you should release the current master on npm so that people can use the package via npm registry instead of using the master branch.

Does not respond to screen size changes on external display

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.