{"id":19495441,"url":"https://github.com/guilhe/placeholderrecyclerview","last_synced_at":"2025-04-25T21:32:37.718Z","repository":{"id":57727797,"uuid":"259093223","full_name":"GuilhE/PlaceHolderRecyclerView","owner":"GuilhE","description":"A RecyclerView that can switch between items and placeholders","archived":false,"fork":false,"pushed_at":"2022-08-29T17:20:46.000Z","size":6153,"stargazers_count":35,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T03:41:13.529Z","etag":null,"topics":["android","androidx","kotlin","lottie-animation","placeholder","placeholder-recyclerview","recyclerview","recyclerview-adapter","shimmer-recyclerview"],"latest_commit_sha":null,"homepage":"https://guilhe.github.io/PlaceHolderRecyclerView/","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/GuilhE.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://www.buymeacoffee.com/GuilhE"}},"created_at":"2020-04-26T17:36:07.000Z","updated_at":"2025-01-11T05:33:04.000Z","dependencies_parsed_at":"2022-08-30T06:01:19.769Z","dependency_job_id":null,"html_url":"https://github.com/GuilhE/PlaceHolderRecyclerView","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhE%2FPlaceHolderRecyclerView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhE%2FPlaceHolderRecyclerView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhE%2FPlaceHolderRecyclerView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhE%2FPlaceHolderRecyclerView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuilhE","download_url":"https://codeload.github.com/GuilhE/PlaceHolderRecyclerView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250900362,"owners_count":21505041,"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","androidx","kotlin","lottie-animation","placeholder","placeholder-recyclerview","recyclerview","recyclerview-adapter","shimmer-recyclerview"],"created_at":"2024-11-10T21:37:48.376Z","updated_at":"2025-04-25T21:32:36.720Z","avatar_url":"https://github.com/GuilhE.png","language":"Kotlin","funding_links":["https://www.buymeacoffee.com/GuilhE"],"categories":[],"sub_categories":[],"readme":"# PlaceHolderRecyclerView\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-PlaceHolderRecyclerView-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/8193)\n    \n\u003cimg src=\"media/stone.gif\" /\u003e \u003cimg src=\"media/lottie.gif\" /\u003e \u003cimg src=\"media/emoji.gif\" /\u003e  \n\nA RecyclerView that can switch between items and placeholders.  \nThis libs doesn't force a placehoder type, the developer is responsible for creating one, checkout the sample module and see how simple it is.  \n\nYou can use the best beloved [Shimmer-Android](http://facebook.github.io/shimmer-android/), a [Lottie](https://airbnb.design/lottie/) animation or even [Property Animation](https://developer.android.com/guide/topics/resources/animation-resource). Use your imagination, it's your placeholder 😊\n\n# Installation\n\nPlaceHolderRecyclerView is distributed through [Maven Central](https://search.maven.org/artifact/com.github.guilhe/placeholder-recyclerview) and [Jitpack](https://jitpack.io/#GuilhE/PlaceHolderRecyclerView).\n\n```groovy\nimplementation 'com.github.guilhe:placeholder-recyclerview:${LATEST_VERSION}'\n```\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.guilhe/placeholder-recyclerview.svg)](https://search.maven.org/search?q=g:com.github.guilhe%20AND%20placeholder-recyclerview)\n\n## Usage\n\n```xml\n\u003ccom.github.guilhe.views.PlaceHolderRecyclerView\n        android:id=\"@+id/my_RecyclerView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" /\u003e\n```\n```kotlin\nclass MyItemsPlaceHolderAdapter : ..., PlaceHolderAdapter { ... }\n\nprivate val itemsAdapter = MyItemsAdapter()\n...\nwith(binding.myRecyclerView) {\n    adapter = itemsAdapter\n    holdersAdapter = MyItemsPlaceHolderAdapter()\n    holdersItemDecoration = MyItemsDecoration() //if needed\n}\n...\nviewModel.items.observe(this, { itemsAdapter.update(it) })\nviewModel.isLoading.observe(this, { isLoading -\u003e binding.myRecyclerView.toggleHoldersAdapter(isLoading) })\n```\n\n\u003cimg src=\"media/sample.gif\" /\u003e  \n\nDon't recognise those chinese characters? They're from an awesome game called [Mahjong](https://en.wikipedia.org/wiki/Mahjong)  \nLottie animation by [puput Santoso](https://lottiefiles.com/puput_santoso)\n\n    \n## Dependencies\n- [androidx.recyclerview:recyclerview](https://developer.android.com/jetpack/androidx/releases/recyclerview)\n\n## Bugs and Feedback\n\nFor bugs, questions and discussions please use the [Github Issues](https://github.com/GuilhE/PlaceHolderRecyclerView/issues).\n\n## LICENSE\n\nCopyright (c) 2020-present GuilhE\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\u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilhe%2Fplaceholderrecyclerview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguilhe%2Fplaceholderrecyclerview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilhe%2Fplaceholderrecyclerview/lists"}