{"id":26103267,"url":"https://github.com/androidwithrossyn/circleviewimagektx","last_synced_at":"2025-07-16T06:32:32.490Z","repository":{"id":278549415,"uuid":"860859648","full_name":"AndroidWithRossyn/CircleViewImagektx","owner":"AndroidWithRossyn","description":"CircleViewImagektx is a lightweight Kotlin Class designed for easily displaying images in a circular view on Android","archived":false,"fork":false,"pushed_at":"2025-02-20T11:00:35.000Z","size":552,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T11:44:23.843Z","etag":null,"topics":["android","appcompatimageview","circleimageview","circleviewimage","circleviewimagektx","circular-imageview","hdodenhof","hdodenhof-library","imageview","widget"],"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/AndroidWithRossyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-21T11:06:54.000Z","updated_at":"2025-02-20T11:00:39.000Z","dependencies_parsed_at":"2025-02-20T11:54:48.807Z","dependency_job_id":null,"html_url":"https://github.com/AndroidWithRossyn/CircleViewImagektx","commit_stats":null,"previous_names":["androidwithrossyn/circleviewimagektx"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidWithRossyn%2FCircleViewImagektx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidWithRossyn%2FCircleViewImagektx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidWithRossyn%2FCircleViewImagektx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidWithRossyn%2FCircleViewImagektx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndroidWithRossyn","download_url":"https://codeload.github.com/AndroidWithRossyn/CircleViewImagektx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242744101,"owners_count":20178174,"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","appcompatimageview","circleimageview","circleviewimage","circleviewimagektx","circular-imageview","hdodenhof","hdodenhof-library","imageview","widget"],"created_at":"2025-03-09T20:05:59.121Z","updated_at":"2025-03-09T20:05:59.701Z","avatar_url":"https://github.com/AndroidWithRossyn.png","language":"Kotlin","readme":"\u003ch2 align=\"center\"\u003eCircleImageView Kotlin\u003c/h2\u003e\n\n## Thanks to [Henning Dodenhof](https://github.com/hdodenhof) for Java [Libraray](https://github.com/hdodenhof/CircleImageView)\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"\"\u003e\n      \u003cimg src=\"https://github.com/user-attachments/assets/aa99156b-646d-4a64-9f47-4fa2b063981d\" width=\"1000\" /\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\n\n\n\nIt uses a BitmapShader and does not:\n\n- create a copy of the original bitmap\n- use a clipPath (which is neither hardware accelerated nor anti-aliased)\n- use setXfermode to clip the bitmap (which means drawing twice to the canvas)\n\nAs this is just a custom ImageView and not a custom Drawable or a combination of both, it can be used with all kinds of drawables, i.e. a PicassoDrawable from Picasso or other non-standard drawables (needs some testing though).\n\n\n\n--- \n\nTo use the `CircleImageView` class in your Android project, follow these steps:\n\n### 1. **Add the `CircleImageView` class to your project:**\n\nEnsure that you have the `CircleImageView` class code in your project. This code should be in a Kotlin file, such as `CircleImageView.kt`.\n\n### 2. **Include the `CircleImageView` in your layout XML:**\n\nOnce the class is added to your project, you can use it in your XML layouts just like any other view. Here's how to include it in an XML layout file:\n\n```xml\n\u003cyour.package.name.CircleImageView\n    android:id=\"@+id/profile_image\"\n    android:layout_width=\"100dp\"\n    android:layout_height=\"100dp\"\n    android:src=\"@drawable/your_image\"\n    app:civ_border_width=\"2dp\"\n    app:civ_border_color=\"@android:color/white\"\n    app:civ_circle_background_color=\"@android:color/black\"\n    app:civ_border_overlay=\"true\" /\u003e\n```\n\n### 3. **Reference `CircleImageView` in your Activity or Fragment:**\n\nYou can reference and manipulate the `CircleImageView` programmatically in your Activity or Fragment as follows:\n\n```kotlin\n// In your Activity or Fragment\nval profileImageView = findViewById\u003cCircleImageView\u003e(R.id.profile_image)\n\n// Set border color programmatically\nprofileImageView.borderColor = Color.RED\n\n// Set border width programmatically\nprofileImageView.borderWidth = 5 // in pixels\n\n// Set circle background color programmatically\nprofileImageView.circleBackgroundColor = Color.BLUE\n\n// Load an image from a URL using Glide (if using Glide)\nGlide.with(this)\n    .load(\"https://example.com/image.jpg\")\n    .into(profileImageView)\n```\n\n### 4. **Customize Attributes via XML:**\n\nIn your XML layout, you can customize various attributes of the `CircleImageView`:\n- `app:civ_border_width`: Sets the border width around the circular image.\n- `app:civ_border_color`: Sets the border color.\n- `app:civ_circle_background_color`: Sets the background color of the circle.\n- `app:civ_border_overlay`: If true, the border is drawn on top of the image.\n\n### 5. **Attributes Overview:**\n\n- **`civ_border_width`**: The width of the border around the image.\n- **`civ_border_color`**: The color of the border.\n- **`civ_circle_background_color`**: The background color of the circle.\n- **`civ_border_overlay`**: If `true`, the border overlays the image; otherwise, it surrounds the image.\n\n\nElevate your Android app to the next level with our state-of-the-art solutions! Contact us today and let’s create something extraordinary!\n\n\u003cdiv align=\"start\"\u003e\n  \n\u003ca href=\"mailto:banrossyn@gmail.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Gmail-EA4335.svg?logo=Gmail\u0026logoColor=white\"\u003e\u003c/a\u003e\n[![Instagram](https://img.shields.io/badge/Instagram-%23E4405F.svg?logo=Instagram\u0026logoColor=white)](https://instagram.com/rohitraj.khorwal) [![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/rohitrajkhorwal/) [![Medium](https://img.shields.io/badge/Medium-12100E?logo=medium\u0026logoColor=white)](https://medium.com/@rohitrajkhorwal) \n\u003ca href=\"https://t.me/banrossyn\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Telegram-26A5E4.svg?logo=Telegram\u0026logoColor=white\"\u003e\u003c/a\u003e\n\u003ca href=\"https://wa.me/+919694260426/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/WhatsApp-25D366.svg?logo=WhatsApp\u0026logoColor=white\"\u003e\n\u003c/div\u003e\n\n\n---\n\n`Note:` Please review our [Code of Conduct](./CODE_OF_CONDUCT.md) before using this project.\n# Find this Repository useful? ❤️\n\nSupport it by joining stargazers for this repository. ⭐\n\nAlso, [follow me on GitHub](https://github.com/AndroidWithRossyn/) for my next creations! 🤩\n\n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://github.com/AndroidWithRossyn?tab=repositories\u0026sort=stargazers\"\u003e\u003cimg alt=\"All Repositories\" title=\"All Repositories\" src=\"https://custom-icon-badges.demolab.com/badge/-Click%20Here%20For%20All%20My%20Repos-1F222E?style=for-the-badge\u0026logoColor=white\u0026logo=repo\"/\u003e\u003c/a\u003e\n  \n\u003c/p\u003e\n\n\n## ☕ Fuel My Code\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.paypal.com/paypalme/banrossyn\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Support_My_Work-00457C?style=for-the-badge\u0026logo=paypal\u0026logoColor=white\" alt=\"PayPal\"/\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://github.com/AndroidWithRossyn/AndroidWithRossyn/blob/main/donate/upi_scan.jpg?raw=true\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Support_via_UPI-4CAF50?style=for-the-badge\u0026logo=google-pay\u0026logoColor=white\" alt=\"UPI\"/\u003e\n  \u003c/a\u003e\n  \u003cp\u003e\u003ci\u003eYour support transforms caffeine into code! ✨\u003c/i\u003e\u003c/p\u003e\n  \n  \u003ctable\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e🚀 Faster Updates\u003c/td\u003e\n      \u003ctd\u003e🔍 Better Documentation\u003c/td\u003e\n      \u003ctd\u003e🛠️ More Features\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n  \n  \u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eWhy Support?\u003c/b\u003e\u003c/summary\u003e\n    \u003cp\u003eEvery contribution helps me dedicate more time to creating high-quality open source Code. Your support directly translates to better software for everyone!\u003c/p\u003e\n  \u003c/details\u003e\n\u003c/div\u003e\n\n\n\n## License\n\n```\nCopyright: \n~ Rossyn\n~ Rohitraj Khorwal\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\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://capsule-render.vercel.app/api?type=waving\u0026color=gradient\u0026height=60\u0026section=footer\"/\u003e\n\u003c/p\u003e\n\n\n\n\n\n\n\n\n\n","funding_links":["https://www.paypal.com/paypalme/banrossyn"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidwithrossyn%2Fcircleviewimagektx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroidwithrossyn%2Fcircleviewimagektx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidwithrossyn%2Fcircleviewimagektx/lists"}