{"id":20009236,"url":"https://github.com/samlss/clockview","last_synced_at":"2025-10-29T08:02:29.706Z","repository":{"id":201738123,"uuid":"144659505","full_name":"samlss/ClockView","owner":"samlss","description":"⏰A  lovely clock view.","archived":false,"fork":false,"pushed_at":"2018-08-14T07:20:39.000Z","size":884,"stargazers_count":264,"open_issues_count":0,"forks_count":32,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-08T21:09:00.026Z","etag":null,"topics":["android","clock","clockview"],"latest_commit_sha":null,"homepage":"","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/samlss.png","metadata":{"files":{"readme":"README-ZH.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}},"created_at":"2018-08-14T02:43:39.000Z","updated_at":"2024-10-20T08:53:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"310671b8-f201-4f56-91db-84f35fcf9699","html_url":"https://github.com/samlss/ClockView","commit_stats":null,"previous_names":["samlss/clockview"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/samlss/ClockView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FClockView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FClockView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FClockView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FClockView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samlss","download_url":"https://codeload.github.com/samlss/ClockView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FClockView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281584979,"owners_count":26526171,"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-29T02:00:06.901Z","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","clock","clockview"],"created_at":"2024-11-13T07:14:45.267Z","updated_at":"2025-10-29T08:02:29.660Z","avatar_url":"https://github.com/samlss.png","language":"Java","readme":"\n# ClockView\n一个可爱的时钟\n\n\u003cbr/\u003e\n\n[![Api reqeust](https://img.shields.io/badge/api-11+-green.svg)](https://github.com/samlss/ClockView)  [![Apache License 2.0](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/samlss/ClockView/blob/master/LICENSE) [![Blog](https://img.shields.io/badge/samlss-blog-orange.svg)](https://blog.csdn.net/Samlss)\n\n### 平常情况下效果:\n![gif1](https://github.com/samlss/ClockView/blob/master/screenshots/screenshot1.gif)\n\n### 闹钟响铃效果:\n![gif2](https://github.com/samlss/ClockView/blob/master/screenshots/screenshot2.gif)\n\n\n### 设置自定义颜色时的效果:\n![gif4](https://github.com/samlss/ClockView/blob/master/screenshots/screenshot4.gif)\n\n\n## Use\u003cbr\u003e\n在根目录的build.gradle添加这一句代码：\n```\nallprojects {\n    repositories {\n        //...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n在app目录下的build.gradle添加依赖使用：\n```\ndependencies {\n    implementation 'com.github.samlss:ClockView:1.0'\n}\n```\n\n### 属性说明：\n\n#### 开始属性说明之前，先看一张图\n![picture](https://github.com/samlss/ClockView/blob/master/screenshots/screenshot3.png)\n\n| 属性        | 说明           |\n| ------------- |:-------------:|\n| ear_color      | 耳朵的颜色 |\n| foot_color | 脚的颜色 |\n| head_color | 头的颜色 |\n| edge_color | 时钟边缘的颜色  |\n| scale_color | 时钟刻度的颜色 |\n| center_point_color | 时钟中心圆的颜色 |\n| hour_hand_color | 时针颜色 |\n| minute_hand_color |分针颜色 |\n| second_hand_color | 秒针颜色 |\n\n\u003cbr/\u003e\n\n\n### 布局中使用\n```\n\u003ccom.iigo.library.ClockView\n       android:id=\"@+id/clockView\"\n       app:minute_hand_color=\"@color/colorPrimary\"\n       app:hour_hand_color=\"@color/colorPrimary\"\n       app:center_point_color=\"@color/colorPrimary\"\n       app:ear_color=\"@color/colorPrimary\"\n       app:edge_color=\"@color/colorPrimary\"\n       app:foot_color=\"@color/colorPrimary\"\n       app:head_color=\"@color/colorPrimary\"\n       app:scale_color=\"@color/colorPrimary\"\n       app:second_hand_color=\"@color/colorPrimary\"\n       android:layout_centerInParent=\"true\"\n       android:layout_width=\"150dp\"\n       android:layout_height=\"150dp\" /\u003e\n```\n\n### 代码中使用：\n```\n  mClockView.setTime(hour, minute, second); //将时钟与现实时间绑定\n```\n\n### 同时你可以使用 [ClockHelper.java](https://github.com/samlss/ClockView/blob/master/library/src/main/java/com/iigo/library/ClockHelper.java) 将ClockView与现实时间联系并且测试闹钟响铃效果\n```\n  clockHelper = new ClockHelper(clockView); //创建 'ClockHelper' 对象.\n  clockHelper.start(); //开始将'ClockView' 与现实时间绑定.\n  clockHelper.stop(); //当你不需要使用'ClockView'的时候，调用该接口，例如在activity#onDestroy()中调用.\n  clockHelper.goOff(); //测试响铃效果.\n```\n\n\n\n### License\n\n```\nCopyright 2018 samlss\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fclockview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamlss%2Fclockview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fclockview/lists"}