{"id":20009168,"url":"https://github.com/samlss/powerview","last_synced_at":"2026-03-11T23:03:18.639Z","repository":{"id":201738187,"uuid":"145519834","full_name":"samlss/PowerView","owner":"samlss","description":"🔋A pretty charging view.","archived":false,"fork":false,"pushed_at":"2018-08-21T07:10:35.000Z","size":250,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-18T22:49:08.045Z","etag":null,"topics":["android","chargingview","powerview"],"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-21T06:51:56.000Z","updated_at":"2022-01-22T07:59:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f9b79e6-0777-4093-a56a-9a87e235ce30","html_url":"https://github.com/samlss/PowerView","commit_stats":null,"previous_names":["samlss/powerview"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/samlss/PowerView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FPowerView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FPowerView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FPowerView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FPowerView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samlss","download_url":"https://codeload.github.com/samlss/PowerView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FPowerView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30406400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T22:36:59.286Z","status":"ssl_error","status_checked_at":"2026-03-11T22:36:57.544Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","chargingview","powerview"],"created_at":"2024-11-13T07:14:30.798Z","updated_at":"2026-03-11T23:03:18.622Z","avatar_url":"https://github.com/samlss.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# PowerView\n一个简约的充电view\n\n\u003cbr/\u003e\n\n[![Api reqeust](https://img.shields.io/badge/api-1+-green.svg)](https://github.com/samlss/PowerView)  [![Apache License 2.0](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/samlss/PowerView/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/PowerView/blob/master/screenshots/screenshot2.gif)\n\n### 垂直效果:\n![gif2](https://github.com/samlss/PowerView/blob/master/screenshots/screenshot1.gif)\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:PowerView:1.0'\n}\n```\n\n### 属性说明：\n\n| 属性        | 说明           |\n| ------------- |:-------------:|\n| powerColor      | 电量颜色  |\n| bgColor | 背景颜色 |\n| powerProgress | 当前电量(0-100) |\n| orientation | 方向设置(水平/垂直) |\n\n\u003cbr/\u003e\n\n\n### 布局中使用\n```\n    \u003ccom.iigo.library.PowerView\n              android:layout_width=\"150dp\"\n              android:layout_height=\"65dp\"\n              app:bgColor=\"@color/colorPrimary\"\n              app:powerColor=\"@color/colorAccent\"\n              app:orientation=\"horizontal\"\n              app:powerProgress=\"5\" /\u003e\n```\n\n### 代码中使用：\n```\n   powerView.setProgress(progress); //set current progress\n   powerView.setBgColor(Color.BLACK); //set the color of battery background\n   powerView.setPowerColor(Color.RED); //set the color of charging power.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fpowerview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamlss%2Fpowerview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fpowerview/lists"}