{"id":13644840,"url":"https://github.com/code-mc/loadtoast","last_synced_at":"2025-05-16T06:02:31.566Z","repository":{"id":31004121,"uuid":"34562528","full_name":"code-mc/loadtoast","owner":"code-mc","description":"Pretty material design toasts with feedback animations","archived":false,"fork":false,"pushed_at":"2021-02-22T09:06:06.000Z","size":1358,"stargazers_count":1532,"open_issues_count":11,"forks_count":223,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-04-08T15:13:31.107Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-mc.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-04-25T09:19:28.000Z","updated_at":"2025-04-01T11:31:26.000Z","dependencies_parsed_at":"2022-08-26T08:21:42.756Z","dependency_job_id":null,"html_url":"https://github.com/code-mc/loadtoast","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-mc%2Floadtoast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-mc%2Floadtoast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-mc%2Floadtoast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-mc%2Floadtoast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-mc","download_url":"https://codeload.github.com/code-mc/loadtoast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478160,"owners_count":22077675,"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-08-02T01:02:15.200Z","updated_at":"2025-05-16T06:02:31.522Z","avatar_url":"https://github.com/code-mc.png","language":"Java","readme":"# Load Toast Library\n\nThe default toasts are ugly and don't really provide much more than a short message. This small library provides a better toast which will give the user feedback by morphing into a checkmark or cross (success and fail). The lifetime of the toast is completely controlled by you.\n\n# Demo\n\n![](http://i.imgur.com/WwoxLMu.gif)\n\n# Usage\n\n## Step 1\n\n#### Gradle\n```groovy\ndependencies {\n    compile 'net.steamcrafted:load-toast:1.0.12'\n}\n```\n\n## Step 2\n\nThe API is very simple, create a new toast by providing a context:\n\n```java\nLoadToast lt = new LoadToast(context);\n```\n\nChange the displayed text:\n\n```java\nlt.setText(\"Sending Reply...\");\n```\n\nIf you don't have a message to display, the toast will shrink to only show the circular loader.\n\nThen proceed to show the toast:\n\n```java\nlt.show();\n```\n\nWhen your background thingy is done provide feedback to the user and hide the toast:\n\n```java\n// Call this if it was successful\nlt.success();\n\n// Or this method if it failed\nlt.error();\n\n// Or if no feedback is desired you can simply hide the toast\nlt.hide();\n```\n\nTo properly position the toast use the following method to adjust the Y offset:\n\n```java\nlt.setTranslationY(100); // y offset in pixels\n```\n\nYou can also change the colors of the different toast elements:\n\n```java\nlt.setTextColor(Color.RED).setBackgroundColor(Color.GREEN).setProgressColor(Color.BLUE);\n```\n\nIn some situations a border might be desired for increased visibility, by default it is transparent:\n\n```java\n// Change the border color\nlt.setBorderColor(int color);\n\n// Change the border width\nlt.setBorderWidthPx(int widthPx);\nlt.setBorderWidthDp(int widthDp);\nlt.setBorderWidthRes(int resourceId);\n```\n\nWhen displaying a message in a RTL language you can force the text to marquee from left to right instead of the default right to left:\n\n```java\n// pass in false for RTL text, true for LTR text\nlt.setTextDirection(boolean isLeftToRight);\n```\n\nThese can be chained as you can see.\n\n# License\n\nReleased under the [Apache 2.0 License](https://github.com/code-mc/loadtoast/blob/master/license.md)\n","funding_links":[],"categories":["Toast","Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-mc%2Floadtoast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-mc%2Floadtoast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-mc%2Floadtoast/lists"}