{"id":18310065,"url":"https://github.com/mthli/slice","last_synced_at":"2025-07-21T10:33:47.716Z","repository":{"id":74328410,"uuid":"48723613","full_name":"mthli/Slice","owner":"mthli","description":"Android drawable that allows you custom round rect position.","archived":false,"fork":false,"pushed_at":"2018-12-26T07:43:03.000Z","size":165,"stargazers_count":593,"open_issues_count":3,"forks_count":55,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-25T18:06:29.773Z","etag":null,"topics":["android","cardview","drawable"],"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/mthli.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,"roadmap":null,"authors":null}},"created_at":"2015-12-29T02:47:17.000Z","updated_at":"2025-05-02T12:01:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"244438c1-8828-4218-8af1-8af6c03d5ec0","html_url":"https://github.com/mthli/Slice","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mthli/Slice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mthli%2FSlice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mthli%2FSlice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mthli%2FSlice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mthli%2FSlice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mthli","download_url":"https://codeload.github.com/mthli/Slice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mthli%2FSlice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266285570,"owners_count":23905381,"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","cardview","drawable"],"created_at":"2024-11-05T16:13:09.207Z","updated_at":"2025-07-21T10:33:47.693Z","avatar_url":"https://github.com/mthli.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Slice\n===\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Slice-brightgreen.svg?style=flat-square)](http://android-arsenal.com/details/1/2979)\n\n**YOU DON'T NEED CardView**.\n\nAndroid drawable that allows you custom round rect position, with more friendly and flexible API. \n\nSupport Android 2.1+\n\n## Example\n\nFor example, we can build a card style background for RecyclerView:\n\n![example.png](./example.png \"example.png\")\n\n[*DEMO*](https://github.com/mthli/Slice/tree/master/app \"DEMO\")\n\n## API\n\n - `setColorRes(@ColorRes int colorRes)`\n\n - `setColor(@ColorInt int color)`\n \n - `setElevation(@FloatRange(from = 0.0F) float elevationDp)`\n \n - `setRadius(@FloatRange(from = 0.0F) float radiusDp)`\n \n - `setRippleRes(@ColorRes int maskRes)` only work for API 21+.\n \n - `setRipple(@ColorInt int mask)` only work for API 21+.\n \n - `showLeftTopRect(boolean show)`\n \n - `showRightTopRect(boolean show)`\n \n - `showRightBottomRect(boolean show)`\n \n - `showLeftBottomRect(boolean show)`\n \n - `showLeftEdgeShadow(boolean show)` only work for pre API 21.\n \n - `showTopEdgeShadow(boolean show)` only work for pre API 21.\n \n - `showRightEdgeShadow(boolean show)` only work for pre API 21.\n \n - `showBottomEdgeShadow(boolean show)` only work for pre API 21.\n \n## Gradle\n\nAt your top-level `build.gradle` file:\n\n    allprojects {\n        repositories {\n            // ...\n            maven { url 'https://jitpack.io' }\n        }\n    }\n    \nAnd then at your project `build.gradle` file:\n\n    dependencies {\n        implementation 'com.github.mthli:Slice:v1.3'\n    }\n\nDone!\n\n## Thanks\n\n - [CardView](https://www.google.com/url?sa=t\u0026rct=j\u0026q=\u0026esrc=s\u0026source=web\u0026cd=1\u0026cad=rja\u0026uact=8\u0026ved=0ahUKEwicgMb484rKAhUhJaYKHQG9AS0QFggfMAA\u0026url=http%3A%2F%2Fdeveloper.android.com%2Freference%2Fandroid%2Fsupport%2Fv7%2Fwidget%2FCardView.html\u0026usg=AFQjCNGAnZUJaZn0kcQuGn6tnrTfsYfTWw\u0026sig2=3NybbX-R_8BWSq_XFxdzjg \"CardView | Android Developers\")\n\n## License\n\n    Copyright (C) 2018 Matthew Lee\n    Copyright (C) 2014 The Android Open Source Project\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmthli%2Fslice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmthli%2Fslice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmthli%2Fslice/lists"}