{"id":4037,"url":"https://github.com/remobile/react-native-toast","last_synced_at":"2025-04-05T01:07:17.590Z","repository":{"id":57221130,"uuid":"46312051","full_name":"remobile/react-native-toast","owner":"remobile","description":"A android like toast for android and ios, android use native toast, ios use UIView+Toast","archived":false,"fork":false,"pushed_at":"2018-12-17T03:26:20.000Z","size":638,"stargazers_count":343,"open_issues_count":35,"forks_count":143,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-27T18:55:41.017Z","etag":null,"topics":[],"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/remobile.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":"2015-11-17T00:22:19.000Z","updated_at":"2025-02-11T21:32:15.000Z","dependencies_parsed_at":"2022-08-29T04:01:29.422Z","dependency_job_id":null,"html_url":"https://github.com/remobile/react-native-toast","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remobile%2Freact-native-toast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remobile%2Freact-native-toast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remobile%2Freact-native-toast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remobile%2Freact-native-toast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remobile","download_url":"https://codeload.github.com/remobile/react-native-toast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271530,"owners_count":20911587,"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-01-05T20:16:59.185Z","updated_at":"2025-04-05T01:07:17.553Z","avatar_url":"https://github.com/remobile.png","language":"Objective-C","funding_links":[],"categories":["Components","Objective-C","Others"],"sub_categories":["UI"],"readme":"# React Native Toast (remobile)\nA android like toast for react-native support for ios and android\n\n## Installation\n```sh\nnpm install @remobile/react-native-toast --save\n```\n\n### Installation (iOS)\n* Drag RCTToast.xcodeproj to your project on Xcode.\n* Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTToast.a from the Products folder inside the RCTToast.xcodeproj.\n* Look for Header Search Paths and make sure it contains both $(SRCROOT)/../../../react-native/React as recursive.\n\n### Installation (Android)\n```gradle\n...\ninclude ':react-native-toast'\nproject(':react-native-toast').projectDir = new File(settingsDir, '../node_modules/@remobile/react-native-toast/android')\n```\n\n* In `android/app/build.gradle`\n\n```gradle\n...\ndependencies {\n    ...\n    compile project(':react-native-toast')\n}\n```\n\n* register module (in MainApplication.java)\n\n```java\n......\nimport com.remobile.toast.RCTToastPackage;  // \u003c--- import\n\n......\n\n@Override\nprotected List\u003cReactPackage\u003e getPackages() {\n   ......\n   new RCTToastPackage(),            // \u003c------ add here\n   ......\n}\n\n```\n```\n\n### Screencasts\n![ios](https://github.com/remobile/react-native-toast/blob/master/screencasts/ios.gif)\n\n## Usage\n\n### Example\n```js\nvar React = require('react');\nvar ReactNative = require('react-native');\nvar {\n    StyleSheet,\n    View,\n    Image\n} = ReactNative;\n\nvar Toast = require('react-native-toast');\nvar Button = require('@remobile/react-native-simple-button');\n\nmodule.exports = React.createClass({\n    render() {\n        return (\n            \u003cView style={styles.container}\u003e\n                \u003cButton onPress={Toast.show.bind(null, \"this is a message\")}\u003e\n                    show\n                \u003c/Button\u003e\n                \u003cButton onPress={Toast.showShortTop.bind(null, \"this is a message\")}\u003e\n                    showShortTop\n                \u003c/Button\u003e\n                \u003cButton onPress={Toast.showShortCenter.bind(null, \"this is a message\")}\u003e\n                    showShortCenter\n                \u003c/Button\u003e\n                \u003cButton onPress={Toast.showShortBottom.bind(null, \"this is a message\")}\u003e\n                    showShortBottom\n                \u003c/Button\u003e\n                \u003cButton onPress={Toast.showLongTop.bind(null, \"this is a message\")}\u003e\n                    showLongTop\n                \u003c/Button\u003e\n                \u003cButton onPress={Toast.showLongCenter.bind(null, \"this is a message\")}\u003e\n                    showLongCenter\n                \u003c/Button\u003e\n                \u003cButton onPress={Toast.showLongBottom.bind(null, \"this is a message\")}\u003e\n                    showLongBottom\n                \u003c/Button\u003e\n            \u003c/View\u003e\n        );\n    },\n});\n\n\nvar styles = StyleSheet.create({\n    container: {\n        flex: 1,\n        justifyContent: 'space-around',\n        alignItems: 'center',\n        backgroundColor: 'transparent',\n        paddingVertical:150,\n    }\n});\n```\n\n### HELP\n* look https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin\n\n\n### thanks\n* this project come from https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin\n\n### see detail use\n* https://github.com/remobile/react-native-template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremobile%2Freact-native-toast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremobile%2Freact-native-toast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremobile%2Freact-native-toast/lists"}