{"id":13644929,"url":"https://github.com/AndreiD/TSnackBar","last_synced_at":"2025-04-21T10:34:58.384Z","repository":{"id":1896499,"uuid":"44915822","full_name":"AndreiD/TSnackBar","owner":"AndreiD","description":"Android Snackbar from the Top (similar to Crouton)","archived":false,"fork":false,"pushed_at":"2023-01-24T14:43:22.000Z","size":915,"stargazers_count":1132,"open_issues_count":22,"forks_count":203,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-08T16:07:52.515Z","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/AndreiD.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-10-25T15:27:24.000Z","updated_at":"2025-03-17T01:23:00.000Z","dependencies_parsed_at":"2023-02-13T22:30:38.367Z","dependency_job_id":null,"html_url":"https://github.com/AndreiD/TSnackBar","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/AndreiD%2FTSnackBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiD%2FTSnackBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiD%2FTSnackBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiD%2FTSnackBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreiD","download_url":"https://codeload.github.com/AndreiD/TSnackBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250041018,"owners_count":21365200,"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:19.936Z","updated_at":"2025-04-21T10:34:53.374Z","avatar_url":"https://github.com/AndreiD.png","language":"Java","funding_links":[],"categories":["Snackbar","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"Top Snackbar\n==========================\n\nLooking for a contributor here, because I don't have time anymore to take care of this.\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-TSnackBar-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2779)\n\nShow a Snackbar from the top. A big thanks to https://github.com/ejohansson, https://github.com/antoninovitale, https://github.com/hansonchris and everyone that took the time to make pull requests. \n\n\n![alt text](https://raw.githubusercontent.com/AndreiD/TSnackBar/master/app/snackbar.gif \"How the app looks 1\")\n\nIcons support:\n\n![alt text](https://raw.githubusercontent.com/AndreiD/TSnackBar/master/app/with_icon.jpg \"How the app looks 1\")\n\n\n### Installation (app's build.gradle):\n\n\n~~~~ groovy\nmaven {\n            url 'https://jitpack.io'\n        }\n\nimplementation 'com.github.Redman1037:TSnackBar:V2.0.0'\n~~~~\n\n### How to use it (a tutorial starting from **simple usage** to **complex one**):\n\n\n##### Example 1: Simple usage:\n\n~~~~ java\nTSnackbar.make(findViewById(android.R.id.content),\"Hello from TSnackBar.\",TSnackbar.LENGTH_LONG).show();\n~~~~\n\n##### Example 2: Custom colors:\n\n~~~~  java\nTSnackbar snackbar = TSnackbar.make(findViewById(android.R.id.content), \"A Snackbar is a lightweight material design method for providing feedback to a user, while optionally providing an action to the user.\", TSnackbar.LENGTH_LONG);\nsnackbar.setActionTextColor(Color.WHITE);\nView snackbarView = snackbar.getView();\nsnackbarView.setBackgroundColor(Color.parseColor(\"#CC00CC\"));\nTextView textView = (TextView) snackbarView.findViewById(com.androidadvance.topsnackbar.R.id.snackbar_text);\ntextView.setTextColor(Color.YELLOW);\nsnackbar.show();\n~~~~\n\n##### Example 3: Give 'em everything you got:\n\n~~~~ java\n//vectordrawable\nTSnackbar snackbar = TSnackbar\n        .make(relative_layout_main, \"Snacking with VectorDrawable\", TSnackbar.LENGTH_LONG);\n        snackbar.setActionTextColor(Color.WHITE);\n        snackbar.setIconLeft(R.drawable.ic_android_green_24dp, 24);\n        View snackbarView = snackbar.getView();\n        snackbarView.setBackgroundColor(Color.parseColor(\"#CC00CC\"));\n        TextView textView = (TextView) snackbarView.findViewById(com.androidadvance.topsnackbar.R.id.snackbar_text);\n        textView.setTextColor(Color.YELLOW);\n        snackbar.show();\n\n  //left and right icon\n TSnackbar snackbar = TSnackbar\n         .make(relative_layout_main, \"Snacking Left \u0026 Right\", TSnackbar.LENGTH_LONG);\n         snackbar.setActionTextColor(Color.WHITE);\n         snackbar.setIconLeft(R.mipmap.ic_core, 24); //Size in dp - 24 is great!\n         snackbar.setIconRight(R.drawable.ic_android_green_24dp, 48); //Resize to bigger dp\n         snackbar.setIconPadding(8);\n         snackbar.setMaxWidth(3000); //if you want fullsize on tablets\n         View snackbarView = snackbar.getView();\n         snackbarView.setBackgroundColor(Color.parseColor(\"#CC00CC\"));\n         TextView textView = (TextView) snackbarView.findViewById(com.androidadvance.topsnackbar.R.id.snackbar_text);\n         textView.setTextColor(Color.YELLOW);\n         snackbar.show();\n~~~~\n\n#### Troubleshooting \n\n1. Make sure you have the ***latest*** shit. At this moment: compileSdkVersion 99+, targetSdkVersion 99+, buildToolsVersion \"99.0.1\", compile 'com.android.support:appcompat-v7:99.1.0',   compile 'com.android.support:design:99.1.0' etc.\n2. Notice that, if you use ***findViewById(android.R.id.content)*** your tsnackbar might appear over your notifications bar (the one with the clock, battery). To fix it, replace it with your view, coordinator layout etc.\n3. If your TSnackbar appears with padding on the sides, make sure the parent view doesn't have padding.\n4. Note: remember to use CoordinatorLayout if you get some strange behaviour!\n#### Updates, Questions, and Requests\n\nPing me here :)\n\n\n#### Want to contribute ?\n\nYou are a hero.\n\n#### TODO://\n\n* Persistent mode.\n* Waiting for your suggestions\n\n#### Changes List\n\n1.1.1: added .setMaxWidth() method to make (ex: you want them to appear larger(fullwith) on tablets)\n\n#### You like this library ? Check:\n- https://github.com/AndreiD/SimpleChat - Simple Realtime Room Chat in Android.\n- https://github.com/AndreiD/surveylib - A very good looking survey library\n- https://github.com/AndreiD/UltimateAndroidAppTemplate The best android template app to start with\n\n\n## Stargazers over time\n\n[![Stargazers over time](https://starcharts.herokuapp.com/AndreiD/TSnackBar.svg)](https://starcharts.herokuapp.com/AndreiD/TSnackBar)\n      \n      \n#### License\n\n~~~~\nCopyright 2015 AndroidAdvance.com\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n~~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndreiD%2FTSnackBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAndreiD%2FTSnackBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndreiD%2FTSnackBar/lists"}