{"id":19645902,"url":"https://github.com/romancha/android-material-play-pause-view-button","last_synced_at":"2026-02-28T04:30:14.860Z","repository":{"id":202767165,"uuid":"86569834","full_name":"Romancha/android-material-play-pause-view-button","owner":"Romancha","description":"A material play pause view button","archived":false,"fork":false,"pushed_at":"2021-12-21T19:29:46.000Z","size":442,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T21:03:31.067Z","etag":null,"topics":["android","android-library","button","material","play-pause"],"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/Romancha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-03-29T10:36:56.000Z","updated_at":"2024-12-22T22:49:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9960f3b-7c95-4a47-891c-363577b74ab4","html_url":"https://github.com/Romancha/android-material-play-pause-view-button","commit_stats":null,"previous_names":["romancha/android-material-play-pause-view-button"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romancha%2Fandroid-material-play-pause-view-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romancha%2Fandroid-material-play-pause-view-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romancha%2Fandroid-material-play-pause-view-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Romancha%2Fandroid-material-play-pause-view-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Romancha","download_url":"https://codeload.github.com/Romancha/android-material-play-pause-view-button/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239870825,"owners_count":19710794,"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":["android","android-library","button","material","play-pause"],"created_at":"2024-11-11T14:35:48.283Z","updated_at":"2026-02-28T04:30:14.831Z","avatar_url":"https://github.com/Romancha.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"`MaterialPlayPauseViewButton` that toggle play/pause with material animation\n\nThis an improvements of the [OHoussein PlayPauseView](https://github.com/OHoussein/android-material-play-pause-view)\nand [Alex Lockwood's PlayPauseView](https://github.com/alexjlockwood/material-pause-play-animation).\n\n# Demo\n\n\u003cdiv  align=\"center\"\u003e    \n\u003cimg src=\"https://raw.githubusercontent.com/Romancha/android-material-play-pause-view-button/master/media/demo.gif\" alt=\"demo\" align=center /\u003e\n\u003c/div\u003e\n\n# Usage\n\n## Gradle dependency:\n\nAdd the following to your project level \u003ci\u003ebuild.gradle\u003c/i\u003e:\n\n```groovy\nallprojects {\n    repositories {\n        maven {\n            url 'https://jitpack.io'\n        }\n    }\n}\n```\n\nAdd this to your app \u003ci\u003ebuild.gradle\u003c/i\u003e:\n\n```groovy\ndependencies {\n    implementation 'com.github.Romancha:android-material-play-pause-view-button:2.3'\n}\n```\n\n## Xml layout\n\n```xml\n\n\u003corg.romancha.playpause.PlayPauseView\n  android:id=\"@+id/play_pause_view\"\n  android:layout_width=\"60dp\"\n  android:layout_height=\"60dp\"\n  android:clickable=\"true\"\n  android:focusable=\"true\"\n  android:foreground=\"?android:selectableItemBackground\"\n  app:fill_color=\"#e1e1e1\"\n  app:pause_bg=\"#00a2ed\"\n  app:play_bg=\"#001eff\"/\u003e\n```\n\n- pause_bg : the background for the pause status\n- play_bg : the background for the play status\n- fill_color: the icon's color\n\n## Code\n\n#### Click listener\n\n```kotlin\nval playPauseView = layout.findViewById\u003cPlayPauseView\u003e(R.id.play_pause_view)\nplayPauseView.setOnClickListener {\n    // View clicked\n    playPauseView.toggle()\n}\n```\n\n#### Methods\n\n|Methods|Description|\n|---|---|\n|boolean onPlaying()|View is on 'playing' state|\n|boolean onPause()|View is on 'pause' state|\n|toggle()|Toogle the play/pause status with animation|\n|void toggle(boolean withAnim)|Toogle the play/pause status with animation or not|\n|void change(boolean isPlay)|Change state of view with animation. isPlay for playing, false else|\n|change(boolean isPlay, boolean withAnim) |Change state of view with specified behavior|\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Romancha\n\nCopyright 2016 OHoussein\n\nCopyright (c) 2015 Alex Lockwood\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the\nSoftware.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromancha%2Fandroid-material-play-pause-view-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromancha%2Fandroid-material-play-pause-view-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromancha%2Fandroid-material-play-pause-view-button/lists"}