{"id":20009235,"url":"https://github.com/samlss/clockloadingview","last_synced_at":"2025-05-04T19:35:50.339Z","repository":{"id":201738121,"uuid":"142156516","full_name":"samlss/ClockLoadingView","owner":"samlss","description":"🕞A clock loading view.","archived":false,"fork":false,"pushed_at":"2018-08-10T02:30:12.000Z","size":536,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-08T11:37:59.983Z","etag":null,"topics":["android","loadingview"],"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/samlss.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}},"created_at":"2018-07-24T12:38:50.000Z","updated_at":"2020-08-14T03:03:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"69658906-b8d3-45ca-9e2e-cec655cb08bb","html_url":"https://github.com/samlss/ClockLoadingView","commit_stats":null,"previous_names":["samlss/clockloadingview"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FClockLoadingView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FClockLoadingView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FClockLoadingView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FClockLoadingView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samlss","download_url":"https://codeload.github.com/samlss/ClockLoadingView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252390657,"owners_count":21740360,"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","loadingview"],"created_at":"2024-11-13T07:14:45.192Z","updated_at":"2025-05-04T19:35:49.877Z","avatar_url":"https://github.com/samlss.png","language":"Java","readme":"# ClockLoadingView\nA clock loading view(一个时钟loading view).\n\n[![Api reqeust](https://img.shields.io/badge/api-11+-green.svg)](https://github.com/samlss/ClockLoadingView)  [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/samlss/ClockLoadingView/blob/master/LICENSE) [![Blog](https://img.shields.io/badge/samlss-blog-orange.svg)](https://blog.csdn.net/Samlss)\n\n\u003cbr\u003e\n\n  * [中文](#%E4%B8%AD%E6%96%87)\n  * [English](#english)\n  * [License](#license)\n\n\u003cbr\u003e\n\n![gif1](https://github.com/samlss/ClockLoadingView/blob/master/screenshots/screenshot1.gif)\n\n\n\n## 中文\n\n### 使用\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:ClockLoadingView:1.1'\n}\n```\n\n布局中使用：\n```\n \u003ccom.iigo.library.ClockLoadingView\n            android:layout_marginTop=\"80dp\"\n            android:id=\"@+id/clv_loading2\"\n            android:layout_width=\"100dp\"\n            android:layout_height=\"100dp\"\n            app:center_color=\"@color/yellow\"\n            app:circle_color=\"@color/green\"\n            app:hour_hand_color=\"@color/orange\"\n            app:minute_hand_color=\"@color/red\" /\u003e\n```\n\n\u003cbr\u003e\n\n代码中使用：\n```\n  clockLoadingView.start(); //开始动画\n  clockLoadingView.stop(); //结束动画\n  \n  clockLoadingView.setCircleColor(getResources().getColor(R.color.green)); //设置圆描边的颜色\n  clockLoadingView.setCenterColor(getResources().getColor(R.color.yellow)); //设置圆心颜色\n  clockLoadingView.setHourHandColor(getResources().getColor(R.color.orange)); //设置时针颜色\n  clockLoadingView.setMinHandColor(getResources().getColor(R.color.red)); //设置分针颜色\n```\n\n\u003cbr\u003e\n在Activity结束的时候调用一下接口进行释放：\n\n```\n @Override\n    protected void onPause() {\n        super.onPause();\n\n        if (isFinishing()){\n            clockLoadingView.release();\n        }\n    }\n```\n\n\u003cbr\u003e\n\n属性说明：\n\n| 属性        | 说明           |\n| ------------- |:-------------:|\n| circle_color      | 圆的描边颜色 |\n| center_color | 圆心颜色 |\n| hour_hand_color | 时针颜色 |\n| minute_hand_color | 分针颜色 |\n\n\u003cbr\u003e\n\n如果不能满足你的需要，你可以下载源码自行修改。\n\n## English\n\n### Use\u003cbr\u003e\nAdd it in your root build.gradle at the end of repositories：\n```\nallprojects {\n    repositories {\n        //...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\nAdd it in your app build.gradle at the end of repositories:\n```\ndependencies {\n    implementation 'com.github.samlss:ClockLoadingView:1.1'\n}\n```\n\n\nin layout.xml：\n```\n \u003ccom.iigo.library.ClockLoadingView\n            android:layout_marginTop=\"80dp\"\n            android:id=\"@+id/clv_loading2\"\n            android:layout_width=\"100dp\"\n            android:layout_height=\"100dp\"\n            app:center_color=\"@color/yellow\"\n            app:circle_color=\"@color/green\"\n            app:hour_hand_color=\"@color/orange\"\n            app:minute_hand_color=\"@color/red\" /\u003e\n```\n\n\u003cbr\u003e\n\nin java code：\n```\n  clockLoadingView.start(); //start animation\n  clockLoadingView.stop(); //stop animation\n  \n  clockLoadingView.setCircleColor(getResources().getColor(R.color.green)); //set the circle stroke color\n  clockLoadingView.setCenterColor(getResources().getColor(R.color.yellow)); //set the circle center color\n  clockLoadingView.setHourHandColor(getResources().getColor(R.color.orange)); //set the hour hand color\n  clockLoadingView.setMinHandColor(getResources().getColor(R.color.red)); //set the minute hand color\n```\n\u003cbr\u003e\n\nCall the below mehod to release when the activity is finishing.：\n```\n @Override\n    protected void onPause() {\n        super.onPause();\n\n        if (isFinishing()){\n            clockLoadingView.release();\n        }\n    }\n```\n\n\u003cbr\u003e\n\nAttributes description：\n\n| attr        | description  |\n| ------------- |:-------------:|\n| circle_color      | the circle stroke color |\n| center_color | the circle center color |\n| hour_hand_color | the hour hand color |\n| minute_hand_color | the minute hand color |\n\nIf you can not meet your needs, you can download the source code to modify it.\n\n[id]: http://example.com/ \"Optional Title Here\"\n\n## [LICENSE](https://github.com/samlss/PeasLoadingView/blob/master/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fclockloadingview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamlss%2Fclockloadingview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fclockloadingview/lists"}