{"id":13428080,"url":"https://github.com/lopspower/CircularImageView","last_synced_at":"2025-03-16T01:31:45.974Z","repository":{"id":50313569,"uuid":"11444556","full_name":"lopspower/CircularImageView","owner":"lopspower","description":"Create circular ImageView in Android in the simplest way possible","archived":false,"fork":false,"pushed_at":"2022-10-11T08:46:25.000Z","size":5132,"stargazers_count":1962,"open_issues_count":13,"forks_count":411,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-03-09T06:26:59.509Z","etag":null,"topics":["android","circularimageview"],"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":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"lopspower","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2013-07-16T08:32:48.000Z","updated_at":"2025-03-06T21:33:05.000Z","dependencies_parsed_at":"2022-08-12T21:02:16.111Z","dependency_job_id":null,"html_url":"https://github.com/lopspower/CircularImageView","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FCircularImageView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FCircularImageView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FCircularImageView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FCircularImageView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lopspower","download_url":"https://codeload.github.com/lopspower/CircularImageView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814900,"owners_count":20352037,"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","circularimageview"],"created_at":"2024-07-31T01:00:45.609Z","updated_at":"2025-03-16T01:31:45.465Z","avatar_url":"https://github.com/lopspower.png","language":"Kotlin","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"/preview/header.png\"\u003e\u003c/p\u003e\n\nCircularImageView\n=================\n\n\u003cimg src=\"/preview/preview.gif\" alt=\"sample\" title=\"sample\" width=\"300\" height=\"435\" align=\"right\" /\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/circularimageview.svg?label=Maven%20Central)](https://search.maven.org/artifact/com.mikhaellopez/circularimageview)\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 ImageView in the simplest way possible.\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 ImageView add CircularImageView in your layout XML and add CircularImageView library in your project or you can also grab it via Gradle:\n\n```groovy\nimplementation 'com.mikhaellopez:circularimageview:4.3.1'\n```\n\nXML\n-----\n\n```xml\n\u003ccom.mikhaellopez.circularimageview.CircularImageView\n    android:layout_width=\"250dp\"\n    android:layout_height=\"250dp\"\n    android:src=\"@drawable/image\"\n    app:civ_border_color=\"#3f51b5\"\n    app:civ_border_width=\"4dp\"\n    app:civ_shadow=\"true\"\n    app:civ_shadow_radius=\"10dp\"\n    app:civ_shadow_color=\"#3f51b5\"/\u003e\n```\n\nYou must use the following properties in your XML to change your CircularImageView.\n\n| Properties                       | Type                                                         | Default          |\n| -------------------------------- | ------------------------------------------------------------ | ---------------- |\n| `app:civ_circle_color`           | color                                                        | WHITE            |\n| `app:civ_circle_color_start`     | color                                                        | civ_circle_color |\n| `app:civ_circle_color_end`       | color                                                        | civ_circle_color |\n| `app:civ_color_direction`        | left_to_right, right_to_left, top_to_bottom or bottom_to_top | left_to_right    |\n| `app:civ_border`                 | boolean                                                      | true             |\n| `app:civ_border_width`           | dimension                                                    | 4dp              |\n| `app:civ_border_color`           | color                                                        | WHITE            |\n| `app:civ_border_color_start`     | color                                                        | civ_border_color |\n| `app:civ_border_color_end`       | color                                                        | civ_border_color |\n| `app:civ_border_color_direction` | left_to_right, right_to_left, top_to_bottom or bottom_to_top | left_to_right    |\n| `app:civ_shadow`                 | boolean                                                      | false            |\n| `app:civ_shadow_color`           | color                                                        | BLACK            |\n| `app:civ_shadow_radius`          | dimension                                                    | 8dp              |\n| `app:civ_shadow_gravity`         | center, top, bottom, start or end                            | bottom           |\n\n:information_source: You can also use `android:elevation` instead of `app:civ_shadow` to have default Material Design elevation.\n\nKOTLIN\n-----\n\n```kotlin\nval circularImageView = findViewById\u003cCircularImageView\u003e(R.id.circularImageView)\ncircularImageView.apply {\n    // Set Color\n    circleColor = Color.WHITE\n    // or with gradient\n    circleColorStart = Color.BLACK\n    circleColorEnd = Color.RED\n    circleColorDirection = CircularImageView.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 = CircularImageView.GradientDirection.TOP_TO_BOTTOM\n    \n    // Add Shadow with default param\n    shadowEnable = true\n    // or with custom param\n    shadowRadius = 7f\n    shadowColor = Color.RED\n    shadowGravity = CircularImageView.ShadowGravity.CENTER\n}\n```\n\nJAVA\n-----\n\n```java\nCircularImageView circularImageView = findViewById(R.id.circularImageView);\n// Set Color\ncircularImageView.setCircleColor(Color.WHITE);\n// or with gradient\ncircularImageView.setCircleColorStart(Color.BLACK);\ncircularImageView.setCircleColorEnd(Color.RED);\ncircularImageView.setCircleColorDirection(CircularImageView.GradientDirection.TOP_TO_BOTTOM);\n\n// Set Border\ncircularImageView.setBorderWidth(10f);\ncircularImageView.setBorderColor(Color.BLACK);\n// or with gradient\ncircularImageView.setBorderColorStart(Color.BLACK);\ncircularImageView.setBorderColorEnd(Color.RED);\ncircularImageView.setBorderColorDirection(CircularImageView.GradientDirection.TOP_TO_BOTTOM);\n\n// Add Shadow with default param\ncircularImageView.setShadowEnable(true);\n// or with custom param\ncircularImageView.setShadowRadius(7f);\ncircularImageView.setShadowColor(Color.RED);\ncircularImageView.setShadowGravity(CircularImageView.ShadowGravity.CENTER);\n```\n\nLIMITATIONS\n-----\n\n-   By default the ScaleType is **FIT_CENTER**. You can also used **CENTER_INSIDE** AND **CENTER_CROP**.\n-   Enabling adjustViewBounds is not supported as this requires an unsupported ScaleType.\n\nSUPPORT ❤️\n-----\n\nFind this library useful? Support it by joining [**stargazers**](https://github.com/lopspower/CircularImageView/stargazers) for this repository ⭐️\n\u003cbr/\u003e\nAnd [**follow me**](https://github.com/lopspower?tab=followers) for my next creations 👍\n\nLICENCE\n-----\n\nCircularImageView 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":["https://github.com/sponsors/lopspower"],"categories":["Libraries","ImageView","Kotlin","Libs","circularimageview"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flopspower%2FCircularImageView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flopspower%2FCircularImageView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flopspower%2FCircularImageView/lists"}