{"id":13639657,"url":"https://github.com/czy1121/roundbutton","last_synced_at":"2025-04-19T22:33:25.688Z","repository":{"id":199057623,"uuid":"71974705","full_name":"czy1121/roundbutton","owner":"czy1121","description":"可设置圆角背景边框的的按钮","archived":true,"fork":false,"pushed_at":"2017-01-26T09:29:21.000Z","size":125,"stargazers_count":310,"open_issues_count":0,"forks_count":54,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-03T01:15:14.666Z","etag":null,"topics":["roundbutton"],"latest_commit_sha":null,"homepage":null,"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/czy1121.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":"2016-10-26T06:50:16.000Z","updated_at":"2024-05-25T03:31:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"a065d405-a760-4364-a2b0-0376764ee2ba","html_url":"https://github.com/czy1121/roundbutton","commit_stats":null,"previous_names":["czy1121/roundbutton"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czy1121%2Froundbutton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czy1121%2Froundbutton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czy1121%2Froundbutton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czy1121%2Froundbutton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/czy1121","download_url":"https://codeload.github.com/czy1121/roundbutton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223810607,"owners_count":17206799,"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":["roundbutton"],"created_at":"2024-08-02T01:01:03.060Z","updated_at":"2024-11-09T09:31:25.811Z","avatar_url":"https://github.com/czy1121.png","language":"Java","readme":"# RoundButton [![](https://jitpack.io/v/czy1121/roundbutton.svg)](https://jitpack.io/#czy1121/roundbutton)\n \n可设置圆角背景边框的的按钮 \n\n通过调节色彩明度自动计算按下(pressed)状态颜色\n\n![roundbutton](screenshot.png)\n\n## Gradle\n\n``` groovy\nrepositories { \n    maven { url \"https://jitpack.io\" }\n} \ndependencies {\n    compile 'com.github.czy1121:roundbutton:1.1.0'\n}\n```\n    \n## Usage\n    \n**XML**\n\n``` xml\n\u003cezy.ui.view.RoundButton\n    style=\"@style/RoundButton\"\n    android:text=\"Text\"\n    app:btnCornerRadius=\"10dp\" \n    app:btnSolidColor=\"#3F51B5\"/\u003e\n    \n\u003cezy.ui.view.RoundButton\n    style=\"@style/RoundButton.Two\"\n    android:text=\"Text\"\n    android:textColor=\"#3F51B5\"\n    app:btnCornerRadius=\"10dp\"\n    app:btnPressedRatio=\"1.5\"\n    app:btnStrokeColor=\"#3F51B5\"/\u003e\n``` \n\n**属性**\n\n``` xml \n\u003cdeclare-styleable name=\"RoundButton\"\u003e\n    \u003c!-- 背景色 --\u003e\n    \u003cattr name=\"btnSolidColor\" format=\"color\"/\u003e\n    \u003c!-- 边框色 --\u003e\n    \u003cattr name=\"btnStrokeColor\" format=\"color\"/\u003e\n    \u003c!-- 边框厚度 --\u003e\n    \u003cattr name=\"btnStrokeWidth\" format=\"dimension\"/\u003e\n    \u003c!-- 边框虚线长度 --\u003e\n    \u003cattr name=\"btnStrokeDashWidth\" format=\"dimension\"/\u003e\n    \u003c!-- 边框虚线间隙 --\u003e\n    \u003cattr name=\"btnStrokeDashGap\" format=\"dimension\"/\u003e\n    \u003c!-- 圆角半径，stadium 表示半径为 min(height,width) / 2--\u003e\n    \u003cattr name=\"btnCornerRadius\" format=\"dimension\"\u003e\n        \u003cenum name=\"stadium\" value=\"-1\"/\u003e\n    \u003c/attr\u003e\n    \u003c!-- 自动计算按下(pressed)状态颜色的系数, 值为0时不自动计算 --\u003e\n    \u003cattr name=\"btnPressedRatio\" format=\"float\"/\u003e\n\u003c/declare-styleable\u003e\n```\n \n\n## License\n\n```\nCopyright 2016 czy1121\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```","funding_links":[],"categories":["按钮"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczy1121%2Froundbutton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fczy1121%2Froundbutton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczy1121%2Froundbutton/lists"}