{"id":21832765,"url":"https://github.com/liying2008/applicationtoast","last_synced_at":"2026-04-06T08:01:28.320Z","repository":{"id":72797223,"uuid":"70496941","full_name":"liying2008/ApplicationToast","owner":"liying2008","description":"Application Toast","archived":false,"fork":false,"pushed_at":"2019-05-29T04:24:01.000Z","size":523,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T10:01:34.678Z","etag":null,"topics":["android","android-app","android-library","app","application-toast","custom","library","open-source","toast"],"latest_commit_sha":null,"homepage":"","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/liying2008.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-10T14:36:59.000Z","updated_at":"2018-10-14T05:04:10.000Z","dependencies_parsed_at":"2023-02-24T02:15:44.658Z","dependency_job_id":null,"html_url":"https://github.com/liying2008/ApplicationToast","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/liying2008/ApplicationToast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liying2008%2FApplicationToast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liying2008%2FApplicationToast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liying2008%2FApplicationToast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liying2008%2FApplicationToast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liying2008","download_url":"https://codeload.github.com/liying2008/ApplicationToast/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liying2008%2FApplicationToast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","android-app","android-library","app","application-toast","custom","library","open-source","toast"],"created_at":"2024-11-27T19:25:28.845Z","updated_at":"2026-04-06T08:01:28.304Z","avatar_url":"https://github.com/liying2008.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"ApplicationToast\n====\n\u003e 使用Application作为Context的Toast，具有即时显示的特性。\n\n\u003e [Download Demo Apk](https://github.com/liying2008/ApplicationToast/releases/download/v0.3/apptoast_demo_v0.3.apk)\n\n引入(Download)\n----\n## Use Gradle  \n```gradle  \ncompile 'cc.duduhuo.applicationtoast:applicationtoast:0.3'\n```\n\n## Or Maven  \n```xml  \n\u003cdependency\u003e\n  \u003cgroupId\u003ecc.duduhuo.applicationtoast\u003c/groupId\u003e\n  \u003cartifactId\u003eapplicationtoast\u003c/artifactId\u003e\n  \u003cversion\u003e0.3\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n使用(Usage)\n----\n## 第一步(The First Step)\n在应用的Application类的\u003ccode\u003eonCreate\u003c/code\u003e方法中初始化\u003ccode\u003eAppToast\u003c/code\u003e类。如下：\n\n```java  \npublic class MyApplication extends Application {\n\n    @Override\n    public void onCreate() {\n        super.onCreate();\n        AppToast.init(this);\n    }\n}\n```\n\n**注意：不要忘记在\u003ccode\u003eAndroidManifest.xml\u003c/code\u003e文件中的\u003ccode\u003eapplication\u003c/code\u003e节点下配置\u003ccode\u003eandroid:name\u003c/code\u003e属性。**    \n## 第二步(The Second Step)\n尽情使用。  \n```java  \nAppToast.showToast(\"Toast 1\");\n```\n\n```java  \nAppToast.showToast(R.string.toast2);\n```\n\n```java  \nAppToast.showToast(\"Toast 3\", Toast.LENGTH_LONG);\n```\n\n```java  \nAppToast.showToast(R.string.toast4, Toast.LENGTH_SHORT);\n```\n\n```java  \nToast toast = AppToast.getToast();\ntoast.setGravity(Gravity.TOP | Gravity.CENTER, 0, 0);\ntoast.setText(\"自定义Toast\");\ntoast.setDuration(Toast.LENGTH_SHORT);\ntoast.show();\n```\n方法说明(Methods)\n----\n| 方法名 | 返回值类型 | 备注\n| --- | --- |  ---\n| init(Application) | void | AppToast initialization\n| showToast(int) | void | Display Toast\n| showToast(CharSequence) | void |  Display Toast\n| showToast(int, int) | void | Display Toast\n| showToast(CharSequence, int) | void | Display Toast\n| getToast() | Toast | Get a Toast object\n| ~~getApplication()~~ | Application | Get this Application\n\n效果演示(Demo)\n----\n![Demo](/demo/demo.gif)\n\n作者(Author)\n----\n李颖  \n新浪微博：[@独毒火][2]  \n邮箱：[liruoer2008@yeah.net][3]\n\n日期(Date)\n----\n2016-12-09\n\nLicense\n----\n\n\tCopyright 2016 LiYing\n\t\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\t\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\t\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n\n\n  [2]: http://weibo.com/neuliying\n  [3]: mailto:liruoer2008@yeah.net\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliying2008%2Fapplicationtoast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliying2008%2Fapplicationtoast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliying2008%2Fapplicationtoast/lists"}