{"id":19247856,"url":"https://github.com/artirigo/react-native-screen-layout","last_synced_at":"2025-11-04T03:03:50.965Z","repository":{"id":57339805,"uuid":"64232304","full_name":"Artirigo/react-native-screen-layout","owner":"Artirigo","description":"React Native Module for reading Android ScreenLayout Configuration","archived":false,"fork":false,"pushed_at":"2016-07-26T15:29:08.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-06T10:02:38.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Artirigo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-26T15:23:59.000Z","updated_at":"2016-10-21T19:25:42.000Z","dependencies_parsed_at":"2022-09-04T14:40:20.048Z","dependency_job_id":null,"html_url":"https://github.com/Artirigo/react-native-screen-layout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Artirigo/react-native-screen-layout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artirigo%2Freact-native-screen-layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artirigo%2Freact-native-screen-layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artirigo%2Freact-native-screen-layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artirigo%2Freact-native-screen-layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Artirigo","download_url":"https://codeload.github.com/Artirigo/react-native-screen-layout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artirigo%2Freact-native-screen-layout/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502282,"owners_count":23618567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T18:05:29.020Z","updated_at":"2025-11-04T03:03:50.922Z","avatar_url":"https://github.com/Artirigo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Module for reading Android ScreenLayout Configuration\n\nThis plugin provides access to the screenLayout configuration on Android devices.\n\n\n\n## Getting started\n\n`$ npm install react-native-screen-layout --save`\n\n### Mostly automatic installation\n\n`$ react-native link react-native-screen-layout`\n\n### Manual installation\n\n\n#### Android\n\n1. Append the following lines to `android/settings.gradle`:\n  \t```\n  \tinclude ':react-native-screen-layout'\n  \tproject(':react-native-screen-layout').projectDir = new File(rootProject.projectDir, \t'../node_modules/react-native-screen-layout/android')\n  \t```\n2. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n  \t```\n      compile project(':react-native-screen-layout')\n  \t```\n3. Import Package\n  \n    **For React Native \u003e= v0.29**\n  \n    Update the `MainApplication.java` file to use the Plugin via the following changes:\n    \n    ```java\n    ...\n    // 1. Import the plugin class.\n   import com.artirigo.screenlayout.RNScreenLayoutPackage;\n    \n    public class MainApplication extends Application implements ReactApplication {\n    \n        private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {\n            ...   \n            @Override\n            protected List\u003cReactPackage\u003e getPackages() {\n                // 2. Instantiate an instance of the Plugin runtime and add it to the list of\n                // existing packages.\n                return Arrays.\u003cReactPackage\u003easList(\n                    new MainReactPackage(),\n                    new RNScreenLayoutPackage()\n                );\n            }\n        };\n    }\n    ```\n    \n    **For React Native v0.19 - v0.28**\n  \n    Update the `MainActivity.java` file to use the Plugin via the following changes:\n    \n    ```java\n    ...\n    // 1. Import the plugin class (if you used RNPM to install the plugin, this\n    // should already be done for you automatically so you can skip this step).\n    import com.artirigo.screenlayout.RNScreenLayoutPackage;\n    \n    public class MainActivity extends ReactActivity {    \n        @Override\n        protected List\u003cReactPackage\u003e getPackages() {\n            // 2. Instantiate an instance of the Plugin runtime and add it to the list of\n            // existing packages.\n            return Arrays.\u003cReactPackage\u003easList(\n                new MainReactPackage(),\n                new RNScreenLayoutPackage()\n            );\n        }\n    \n        ...\n    }\n    ```\n\n\n## Usage\n```javascript\nimport ScreenLayout from 'react-native-screen-layout';\n\nif(ScreenLayout.SCREEN_LAYOUT === ScreenLayout.LARGE) {\n    console.log('this is a large screen');\n}\n\n```\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartirigo%2Freact-native-screen-layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartirigo%2Freact-native-screen-layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartirigo%2Freact-native-screen-layout/lists"}