{"id":18663798,"url":"https://github.com/lopspower/circleview","last_synced_at":"2025-04-07T17:09:08.441Z","repository":{"id":52072954,"uuid":"188834744","full_name":"lopspower/CircleView","owner":"lopspower","description":"Create circular view in android (change color, border \u0026 shadow) ⚫","archived":false,"fork":false,"pushed_at":"2022-08-23T07:45:18.000Z","size":1410,"stargazers_count":165,"open_issues_count":0,"forks_count":20,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T14:14:24.505Z","etag":null,"topics":["android","circleview","customview","java","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/lopspower.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}},"created_at":"2019-05-27T11:57:59.000Z","updated_at":"2025-01-08T11:00:33.000Z","dependencies_parsed_at":"2022-08-30T09:11:03.614Z","dependency_job_id":null,"html_url":"https://github.com/lopspower/CircleView","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/lopspower%2FCircleView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FCircleView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FCircleView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FCircleView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lopspower","download_url":"https://codeload.github.com/lopspower/CircleView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694876,"owners_count":20980733,"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","circleview","customview","java","kotlin"],"created_at":"2024-11-07T08:19:49.547Z","updated_at":"2025-04-07T17:09:08.415Z","avatar_url":"https://github.com/lopspower.png","language":"Kotlin","readme":"CircleView\n=================\n\n\u003cimg src=\"/preview/preview.gif\" alt=\"sample\" title=\"sample\" width=\"300\" height=\"533\" align=\"right\" vspace=\"52\" /\u003e\n\n[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)\n[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14)\n[![Maven Central](https://img.shields.io/maven-central/v/com.mikhaellopez/circleview.svg?label=Maven%20Central)](https://search.maven.org/artifact/com.mikhaellopez/circleview)\n[![Twitter](https://img.shields.io/badge/Twitter-@LopezMikhael-blue.svg?style=flat)](http://twitter.com/lopezmikhael)\n\nThis is an Android project allowing to realize a circular View in the simplest way possible. Finish the oval shapes of all colors in your projects.\n\n\u003ca href=\"https://play.google.com/store/apps/details?id=com.mikhaellopez.lopspower\"\u003e\n  \u003cimg alt=\"Android app on Google Play\" src=\"https://developer.android.com/images/brand/en_app_rgb_wo_45.png\" /\u003e\n\u003c/a\u003e\n\nUSAGE\n-----\n\nTo make a circular View add CircleView in your layout XML and add CircleView library in your project or you can also grab it via Gradle:\n\n```groovy\nimplementation 'com.mikhaellopez:circleview:1.4.1'\n```\n\nXML\n-----\n\n```xml    \n\u003ccom.mikhaellopez.circleview.CircleView\n    android:id=\"@+id/circleView\"\n    android:layout_width=\"300dp\"\n    android:layout_height=\"300dp\"\n    app:cv_border=\"true\"\n    app:cv_border_color=\"#000000\"\n    app:cv_border_width=\"8dp\"\n    app:cv_color=\"#3f51b5\"\n    app:cv_shadow=\"true\"\n    app:cv_shadow_color=\"#3f51b5\"\n    app:cv_shadow_radius=\"10\" /\u003e\n```\n\nYou must use the following properties in your XML to change your CircleView.\n\n| Properties                      | Type                                                         | Default         |\n| ------------------------------- | ------------------------------------------------------------ | --------------- |\n| `app:cv_color`                  | color                                                        | WHITE           |\n| `app:cv_color_start`            | color                                                        | cv_color        |\n| `app:cv_color_end`              | color                                                        | cv_color        |\n| `app:cv_color_direction`        | left_to_right, right_to_left, top_to_bottom or bottom_to_top | left_to_right   |\n| `app:cv_border`                 | boolean                                                      | false           |\n| `app:cv_border_width`           | dimension                                                    | 4dp             |\n| `app:cv_border_color`           | color                                                        | BLACK           |\n| `app:cv_border_color_start`     | color                                                        | cv_border_color |\n| `app:cv_border_color_end`       | color                                                        | cv_border_color |\n| `app:cv_border_color_direction` | left_to_right, right_to_left, top_to_bottom or bottom_to_top | left_to_right   |\n| `app:cv_shadow`                 | boolean                                                      | false           |\n| `app:cv_shadow_color`           | color                                                        | BLACK           |\n| `app:cv_shadow_radius`          | float                                                        | 8.0f            |\n| `app:cv_shadow_gravity`         | center, top, bottom, start or end                            | bottom          |\n\n:information_source: You can also use `android:elevation` instead of `app:cv_shadow` to have default Material Design elevation.\n\nKOTLIN\n-----\n\n\u003cimg src=\"/preview/capture.png\" alt=\"sample\" title=\"sample\" width=\"300\" height=\"533\" align=\"right\" vspace=\"200\" /\u003e\n\n```kotlin\nval circleView = findViewById\u003cCircleView\u003e(R.id.circleView)\ncircleView.apply {\n    // Set Color\n    circleColor = Color.WHITE\n    // or with gradient\n    circleColorStart = Color.BLACK\n    circleColorEnd = Color.RED\n    circleColorDirection = CircleView.GradientDirection.TOP_TO_BOTTOM\n    \n    // Set Border\n    borderWidth = 10f\n    borderColor = Color.BLACK\n    // or with gradient\n    borderColorStart = Color.BLACK\n    borderColorEnd = Color.RED\n    borderColorDirection = CircleView.GradientDirection.TOP_TO_BOTTOM\n    \n    // Add Shadow with default param\n    shadowEnable = true\n    // or with custom param\n    shadowRadius = 15f\n    shadowColor = Color.RED\n    shadowGravity = CircleView.ShadowGravity.CENTER\n}\n```\n\nJAVA\n-----\n\n```java\nCircleView circleView = findViewById(R.id.circleView);\n\n// Set Color\ncircleView.setCircleColor(Color.WHITE);\n// or with gradient\ncircleView.setCircleColorStart(Color.BLACK);\ncircleView.setCircleColorEnd(Color.RED);\ncircleView.setCircleColorDirection(CircleView.GradientDirection.TOP_TO_BOTTOM);\n\n// Set Border\ncircleView.setBorderWidth(10f);\ncircleView.setBorderColor(Color.BLACK);\n// or with gradient\ncircleView.setBorderColorStart(Color.BLACK);\ncircleView.setBorderColorEnd(Color.RED);\ncircleView.setBorderColorDirection(CircleView.GradientDirection.TOP_TO_BOTTOM);\n\n// Add Shadow with default param\ncircleView.setShadowEnable(true);\n// or with custom param\ncircleView.setShadowRadius(15f);\ncircleView.setShadowColor(Color.RED);\ncircleView.setShadowGravity(CircleView.ShadowGravity.CENTER);\n```\n\nSUPPORT ❤️\n-----\n\nFind this library useful? Support it by joining [**stargazers**](https://github.com/lopspower/CircleView/stargazers) for this repository ⭐️\n\u003cbr/\u003e\nAnd [**follow me**](https://github.com/lopspower?tab=followers) for my next creations 👍\n\nLICENCE\n-----\n\nCircleView by [Lopez Mikhael](http://mikhaellopez.com/) is licensed under a [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flopspower%2Fcircleview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flopspower%2Fcircleview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flopspower%2Fcircleview/lists"}