{"id":27320098,"url":"https://github.com/entria/react-native-view-overflow","last_synced_at":"2025-04-12T09:12:47.075Z","repository":{"id":31802702,"uuid":"128960677","full_name":"entria/react-native-view-overflow","owner":"entria","description":"Fix Overflow in react-native for Android","archived":false,"fork":false,"pushed_at":"2022-12-08T18:53:51.000Z","size":883,"stargazers_count":302,"open_issues_count":29,"forks_count":42,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-04-26T06:03:38.778Z","etag":null,"topics":["android","react-native"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-10T16:05:34.000Z","updated_at":"2023-10-18T19:03:19.000Z","dependencies_parsed_at":"2023-01-14T20:00:37.304Z","dependency_job_id":null,"html_url":"https://github.com/entria/react-native-view-overflow","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2Freact-native-view-overflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2Freact-native-view-overflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2Freact-native-view-overflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2Freact-native-view-overflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entria","download_url":"https://codeload.github.com/entria/react-native-view-overflow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543848,"owners_count":21121838,"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":["android","react-native"],"created_at":"2025-04-12T09:12:25.469Z","updated_at":"2025-04-12T09:12:47.063Z","avatar_url":"https://github.com/entria.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-view-overflow\n\n## React Native Version Notice\n\nThis library will be useful for React Native versions below v0.57. For v0.57 and beyond, React Native supports Android overflow natively from [this commit](https://github.com/facebook/react-native/commit/b81c8b51fc6fe3c2dece72e3fe500e175613c5d4).\n\n## Motivation\n\nThe problem is that a parent View in Android will clip the content of children Views (react-native)\n\nThis solves the problem of Overflow on Android (check this https://github.com/facebook/react-native/issues/16951)\n\nThis could make code simpler, so you don't need to move some Components outside parents to make layout work\n\nYou can read more about the motivation and this package here https://medium.com/@sibelius/solving-view-overflow-in-android-reactnative-f961752a75cd\n\n## Getting started\n### Steps to (mostly) automatically install react-native-view-overflow\n#### If you are using react-native \u003e=0.60.0\n\n`$ npm install react-native-view-overflow --save`\n\n#### Otherwise, if you are using react-native \u003c0.60.0 \n\n`$ npm install react-native-view-overflow --save`\n\n`$ react-native link react-native-view-overflow`\n\n## Usage\n```javascript\nimport ViewOverflow from 'react-native-view-overflow';\n\n\u003cViewOverflow\u003e\n    \u003cComponentToEnableOverflow /\u003e\n\u003c/ViewOverflow\u003e\n\n```\n\n## Usage with Flatlist\nTo make this work with FlatList and related components you need to replace `CellRendererComponent` with `ViewOverflow`, for example:\n\n```jsx\n\u003cFlatList\n  data={this.state.data}\n  keyExtractor={item =\u003e item.id}\n  CellRendererComponent={ViewOverflow}\n  renderItem={({ item, index }) =\u003e (\n      \u003cViewOverflow style={styles.item}\u003e\n      // item....\n      \u003c/ViewOverflow\u003e\n   )}\n/\u003e\n```\n\n## Usage with Animated Views\nTo make this work in place of an `Animated.View`, you need to use `Animated.createAnimatedComponent` to create an animatable version of `ViewOverflow`. For example:\n\n```\nimport ViewOverflow from 'react-native-view-overflow';\nconst AnimatedViewOverflow = Animated.createAnimatedComponent(ViewOverflow);\n```\n\nYou can then use `AnimatedViewOverflow` in place of `Animated.View`.\n\n### Manual installation\n\n1. Open up `android/app/src/main/java/[...]/MainApplication.java`\n  - Add `import com.entria.views.RNViewOverflowPackage;` to the imports at the top of the file\n  - Add `new RNViewOverflowPackage()` to the list returned by the `getPackages()` method\n2. Append the following lines to `android/settings.gradle`:\n  \t```\n  \tinclude ':react-native-view-overflow'\n  \tproject(':react-native-view-overflow').projectDir = new File(rootProject.projectDir, \t'../node_modules/react-native-view-overflow/android')\n  \t```\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n  \t```\n      compile project(':react-native-view-overflow')\n  \t```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentria%2Freact-native-view-overflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentria%2Freact-native-view-overflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentria%2Freact-native-view-overflow/lists"}