{"id":15321902,"url":"https://github.com/alxrm/youtube-play-icon","last_synced_at":"2025-10-09T08:31:58.999Z","repository":{"id":93371108,"uuid":"75120583","full_name":"alxrm/youtube-play-icon","owner":"alxrm","description":"Material style morphing play-pause drawable for Android","archived":true,"fork":false,"pushed_at":"2016-12-15T08:09:27.000Z","size":218,"stargazers_count":55,"open_issues_count":2,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-27T05:34:20.546Z","etag":null,"topics":["android","animation","drawable","icons","material","material-design","ui","youtube"],"latest_commit_sha":null,"homepage":"","language":"Java","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/alxrm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-29T20:47:16.000Z","updated_at":"2023-12-17T12:21:54.000Z","dependencies_parsed_at":"2023-03-11T03:00:21.159Z","dependency_job_id":null,"html_url":"https://github.com/alxrm/youtube-play-icon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/alxrm/youtube-play-icon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxrm%2Fyoutube-play-icon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxrm%2Fyoutube-play-icon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxrm%2Fyoutube-play-icon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxrm%2Fyoutube-play-icon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alxrm","download_url":"https://codeload.github.com/alxrm/youtube-play-icon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxrm%2Fyoutube-play-icon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001054,"owners_count":26082991,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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","animation","drawable","icons","material","material-design","ui","youtube"],"created_at":"2024-10-01T09:13:31.204Z","updated_at":"2025-10-09T08:31:58.993Z","avatar_url":"https://github.com/alxrm.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Play\n[![](https://jitpack.io/v/alxrm/youtube-play-icon.svg)](https://jitpack.io/#alxrm/youtube-play-icon)\n[![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)]()\n\nThere is no need to explain what this thing does, just take a look at the gif below.\n\n![](https://github.com/alxrm/youtube-play-icon/blob/master/art/play.gif?raw=true)\n\n## Including in your project\n\nAdd to your root build.gradle:\n```Groovy\nallprojects {\n\trepositories {\n\t    // ...\n\t    maven { url \"https://jitpack.io\" }\n\t}\n}\n```\n\nAdd the dependency:\n```Groovy\ndependencies {\n    compile 'com.github.alxrm:youtube-play-icon:0.9'\n}\n```\n\nUsage\n-----\n\n### PlayIconDrawable\n\nYou can use it as a `Drawable`, and insert into any `ImageView`,\nwith beautiful fluent API like this:\n\n```java\nfinal ImageView iconView = (ImageView) findViewById(R.id.icon_play);\nfinal PlayIconDrawable play = PlayIconDrawable.builder()\n    .withColor(Color.WHITE)\n    .withInterpolator(new FastOutSlowInInterpolator())\n    .withDuration(300)\n    .withInitialState(PlayIconDrawable.IconState.PAUSE)\n    .withAnimatorListener(new AnimatorListenerAdapter() {\n      @Override public void onAnimationEnd(Animator animation) {\n        super.onAnimationEnd(animation);\n        Log.d(\"Animation\", \"animationFinished\");\n      }\n    })\n    .withStateListener(new PlayIconDrawable.StateListener() {\n      @Override public void onStateChanged(PlayIconDrawable.IconState state) {\n        Log.d(\"IconState\", \"onStateChanged: \" + state);\n      }\n    })\n    .into(iconView);\n```\n\nAll of these methods can be ignored, so the drawable will be created with it's default state\n\n_There is an `PlayIconView`, which extends `ImageView` and simply draws the icon and provides an API to work with it.\nYou can use it in any layout._\n\n## API\n\nTo change icon state w/o animation, you can use:\n\n```java\nPlayIcon.setIconState(@NonNull PlayIconDrawable.IconState state)\n```\n\nand to do the same with beautiful morphing animation:\n\n```java\nPlayIcon.animateToState(@NonNull PlayIconDrawable.IconState state)\n```\n\nyou also can use a convenient `toggle` method:\n\n```java\nPlayIcon.toggle(boolean animated);\n```\n\nif you need to know whether the state is changed, there is a handy `StateListener`, you can set one with:\n\n```java\nPlayIcon.setStateListener(@Nullable PlayIconDrawable.StateListener listener);\n```\n\nfor more info about API, take a look at [this](https://github.com/alxrm/youtube-play-icon/blob/master/lib/src/main/java/rm/com/youtubeplayicon/PlayIcon.java)\n\n## Contribution\n\nYou are free to send me PRs and issues, I'd like to help you and improve this.\n\n## License\n\n    MIT License\n\n    Copyright (c) 2016 Alexey Derbyshev\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falxrm%2Fyoutube-play-icon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falxrm%2Fyoutube-play-icon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falxrm%2Fyoutube-play-icon/lists"}