{"id":13989565,"url":"https://github.com/AlbertGrobas/PolygonImageView","last_synced_at":"2025-07-22T11:30:45.750Z","repository":{"id":19081339,"uuid":"22308800","full_name":"AlbertGrobas/PolygonImageView","owner":"AlbertGrobas","description":"Custom ImageView for android with polygon shape (Android)","archived":false,"fork":false,"pushed_at":"2017-04-17T15:47:52.000Z","size":3038,"stargazers_count":545,"open_issues_count":2,"forks_count":124,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-29T08:39:16.964Z","etag":null,"topics":[],"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/AlbertGrobas.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":"2014-07-27T10:51:26.000Z","updated_at":"2024-10-07T13:56:54.000Z","dependencies_parsed_at":"2022-09-02T13:30:09.250Z","dependency_job_id":null,"html_url":"https://github.com/AlbertGrobas/PolygonImageView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AlbertGrobas/PolygonImageView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertGrobas%2FPolygonImageView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertGrobas%2FPolygonImageView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertGrobas%2FPolygonImageView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertGrobas%2FPolygonImageView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlbertGrobas","download_url":"https://codeload.github.com/AlbertGrobas/PolygonImageView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertGrobas%2FPolygonImageView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266483463,"owners_count":23936347,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-09T13:01:45.338Z","updated_at":"2025-07-22T11:30:45.332Z","avatar_url":"https://github.com/AlbertGrobas.png","language":"Java","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"PolygonImageView\n===============\n\nCreate a custom ImageView with polygonal forms.\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-PolygonImageView-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/1851)\n\n![Demo Screenshot 1][1]\n![Demo Screenshot 2][2]\n![Demo Screenshot 3][3]\n\nUsage\n-----\n\nTo use PolygonImageView, add the module into your project and start to build xml or java.\n\n### XML\n```xml\n    \u003cnet.grobas.view.PolygonImageView\n        android:layout_width=\"250dp\"\n        android:layout_height=\"250dp\"\n        android:src=\"@drawable/cat07\"\n        app:poly_shadow=\"true\"\n        app:poly_shadow_color=\"@android:color/black\"\n        app:poly_border=\"true\"\n        app:poly_border_color=\"@android:color/white\"\n        app:poly_vertices=\"6\"\n        app:poly_border_width=\"5dp\"\n        app:poly_corner_radius=\"5\"\n        app:poly_rotation_angle=\"25\" /\u003e\n```\n\n##### Properties:\n\n* `app:poly_vertices` (integer)       -\u003e default 5\n    * `0`  -\u003e Circle\n    * `1`  -\u003e Regular ImageView, no affected by other properties\n    * `2`  -\u003e Square\n    * `\u003e2` -\u003e Polygon form\n* `app:poly_shadow`  (boolean)        -\u003e default false\n* `app:poly_shadow_color` (color)     -\u003e default Black\n* `app:poly_border` (boolean)         -\u003e default false\n* `app:poly_border_color` (color)     -\u003e default White\n* `app:poly_border_width` (dimension) -\u003e default 4dp\n* `app:poly_corner_radius` (float)    -\u003e default 0.0f\n* `app:poly_rotation_angle` (float)   -\u003e default 0.0f\n\n\n### JAVA\n\n```java\n    LinearLayout layout = (LinearLayout) findViewById(R.id.layout);\n    PolygonImageView view = new PolygonImageView(this);\n    view.setImageResource(R.drawable.cat);\n    view.addShadowResource(10f, 0f, 7.5f, R.color.shadow);\n    view.addBorderResource(5, R.color.border);\n    view.setCornerRadius(2);\n    view.setVertices(5);\n    view.setPolygonShape(new PaperPolygonShape(-15, 25));\n    layout.addView(view);\n```\n\n### Effects\n\nThere are 3 basic effects:\n\n* RegularPolygonShape\n* PaperPolygonShape\n* StarPolygonShape\n\nCreate your own effect overriding BasePolygonShape or interface PolygonShape.\n\nLicense\n-------\n\n    Copyright 2014 Albert Grobas\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n\n[1]: ./art/screen01.png\n[2]: ./art/screen02.png\n[3]: ./art/screen03.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlbertGrobas%2FPolygonImageView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlbertGrobas%2FPolygonImageView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlbertGrobas%2FPolygonImageView/lists"}