{"id":13639672,"url":"https://github.com/recruit-lifestyle/PlayPauseButton","last_synced_at":"2025-04-19T22:33:32.294Z","repository":{"id":35545460,"uuid":"39816953","full_name":"recruit-lifestyle/PlayPauseButton","owner":"recruit-lifestyle","description":null,"archived":false,"fork":false,"pushed_at":"2016-08-02T07:18:32.000Z","size":184,"stargazers_count":280,"open_issues_count":2,"forks_count":53,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-08-03T01:15:14.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=p9mtTcH2gAo","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/recruit-lifestyle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-28T06:25:43.000Z","updated_at":"2024-04-12T14:42:12.000Z","dependencies_parsed_at":"2022-09-11T13:31:05.584Z","dependency_job_id":null,"html_url":"https://github.com/recruit-lifestyle/PlayPauseButton","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recruit-lifestyle%2FPlayPauseButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recruit-lifestyle%2FPlayPauseButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recruit-lifestyle%2FPlayPauseButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recruit-lifestyle%2FPlayPauseButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/recruit-lifestyle","download_url":"https://codeload.github.com/recruit-lifestyle/PlayPauseButton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223810628,"owners_count":17206800,"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:01:03.189Z","updated_at":"2024-11-09T09:31:29.339Z","avatar_url":"https://github.com/recruit-lifestyle.png","language":"Java","funding_links":[],"categories":["按钮","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# PlayPauseButton\r\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-PlayPauseButton-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2247)\r\n[![Release](https://img.shields.io/github/release/recruit-lifestyle/PlayPauseButton.svg?label=maven version)](https://github.com/recruit-lifestyle/PlayPauseButton)\r\n[![License](https://img.shields.io/hexpm/l/plug.svg)]()\r\n\r\nThe View makes Animation the state of play.  \r\nEven if this works fine with API.13 or less, we support only for API.14 or more.  \r\n\r\n##Screenshots\r\n*Watch YouTube video [here](https://www.youtube.com/watch?v=p9mtTcH2gAo\u0026feature=youtu.be).*  \r\n\r\n![](./sc/animation.gif)  \r\n\r\n\u003cimg src=\"./sc/sc1.png\" width=\"200\"\u003e\r\n\u003cimg src=\"./sc/sc2.png\" width=\"200\"\u003e\r\n\u003cimg src=\"./sc/sc3.png\" width=\"200\"\u003e\r\n\r\n## Requirements\r\nTarget Sdk Version : 21  \r\nMin Sdk Version : 14  \r\n\r\n##How to use\r\n1) Add this to your **build.gradle**.\r\n```java\r\nrepositories {\r\n    maven {\r\n        url \"https://jitpack.io\"\r\n    }\r\n}\r\n\r\ndependencies {\r\n  compile 'com.github.recruit-lifestyle:PlayPauseButton:1.0'\r\n}\r\n```  \r\n\r\n2) Add ```java jp.co.recruit_lifestyle.android.widget.PlayPauseButton```  to your layout XML file.\r\n```xml\r\n\u003cRelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    \u003e\r\n\r\n    \u003cjp.co.recruit_lifestyle.android.widget.PlayPauseButton\r\n        android:layout_width=\"100dp\"\r\n        android:layout_height=\"100dp\"\r\n        android:layout_centerInParent=\"true\"\r\n        android:id=\"@+id/main_play_pause_button\"\r\n        /\u003e\r\n\r\n\u003c/RelativeLayout\u003e\r\n```  \r\n\r\n3) Add ```PlayPauseButton.OnControlStatusChangeListener```  \r\n```java\r\nplayPauseButton.setOnControlStatusChangeListener(new PlayPauseButton.OnControlStatusChangeListener() {\r\n  @Override public void onStatusChange(View view, boolean state) {\r\n    if(state) {\r\n      mMediaPlayer.start();\r\n    } else {\r\n      mMediaPlayer.pause();\r\n    }\r\n  }\r\n});\r\n```\r\n\r\n## Credits\r\n\r\nWaveSwipeRefresh is owned and maintained by [RECRUIT LIFESTYLE CO., LTD.](http://www.recruit-lifestyle.co.jp/)\r\n\r\nWaveSwipeRefresh was originally created by [Yuki Mima](https://github.com/amyu)  \r\n\r\n\r\n##License\r\n\r\n    Copyright 2015 RECRUIT LIFESTYLE CO., LTD.\r\n\r\n    Licensed under the Apache License, Version 2.0 (the \"License\");\r\n    you may not use this file except in compliance with the License.\r\n    You may obtain a copy of the License at\r\n\r\n       http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n    Unless required by applicable law or agreed to in writing, software\r\n    distributed under the License is distributed on an \"AS IS\" BASIS,\r\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n    See the License for the specific language governing permissions and\r\n    limitations under the License.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecruit-lifestyle%2FPlayPauseButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecruit-lifestyle%2FPlayPauseButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecruit-lifestyle%2FPlayPauseButton/lists"}