react-native-screen-support-orientation

0.0.4 • Public • Published

React Native Method to get current Screen Orientation with its Height and Width in IOS and Android

A react-native component for getting orientation of the screen and height, width of the screen according to its orientation .

Installation

  npm i react-native-screen-support-orientation --save

Usage

import AppDimension from 'react-native-screen-support-orientation'

Method to get the current Orientation, Width and Height of the screen.

        
            AppDimension.getDimension((callback)=>{
                
                alert(JSON.stringify(callback))
                /** this.setState({height:callback.height,width:callback.width,orientation:callback.orientation})
                **/
            })
    
  

Callback arguments

Prop Type Description
orientation String Give the orientation of the screen (PORTRAIT or LANDSCAPE) .
width Number Give the width of the screen according to the screen orientation .
height Number Give the height of the screen according to the screen orientation .

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    1
  • 0.0.3
    0
  • 0.0.2
    0

Package Sidebar

Install

npm i react-native-screen-support-orientation

Weekly Downloads

1

Version

0.0.4

License

ISC

Unpacked Size

4.57 kB

Total Files

5

Last publish

Collaborators

  • ajay001