{"id":25560008,"url":"https://github.com/styropyr0/recyclerlist","last_synced_at":"2026-03-03T00:30:18.537Z","repository":{"id":277016302,"uuid":"931055336","full_name":"styropyr0/RecyclerList","owner":"styropyr0","description":"A recycler view which is easy to implement than a list view with the features of recycler view.","archived":false,"fork":false,"pushed_at":"2025-02-11T17:34:55.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-11T17:47:05.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/styropyr0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2025-02-11T16:41:32.000Z","updated_at":"2025-02-11T17:34:16.000Z","dependencies_parsed_at":"2025-02-11T17:57:16.329Z","dependency_job_id":null,"html_url":"https://github.com/styropyr0/RecyclerList","commit_stats":null,"previous_names":["styropyr0/recyclerlist"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styropyr0%2FRecyclerList","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styropyr0%2FRecyclerList/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styropyr0%2FRecyclerList/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/styropyr0%2FRecyclerList/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/styropyr0","download_url":"https://codeload.github.com/styropyr0/RecyclerList/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239881732,"owners_count":19712631,"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":[],"created_at":"2025-02-20T17:28:52.199Z","updated_at":"2026-03-03T00:30:18.365Z","avatar_url":"https://github.com/styropyr0.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RecyclerList\n\nRecyclerList is an easy-to-use RecyclerView wrapper that eliminates the need to manually declare adapters and ViewHolders. It simplifies the implementation of lists in Android applications, providing a streamlined and efficient way to manage item views.\n\nThis library is built on top of RecyclerView and inherits from it, meaning all standard RecyclerView methods work seamlessly.\n\n## Features\n- No need to manually create adapters and ViewHolders\n- Simple data binding with lambda functions\n- Built-in support for layout management (orientation, reverse layout, stack from end)\n- Easy item removal and dynamic updates\n- Callbacks for view attachment, detachment, and recycling\n\n## Installation\n\nRecyclerList is hosted on JitPack. To include it in your project, follow these steps:\n\n### Step 1: Add JitPack Repository\n\nAdd the JitPack repository to your root `build.gradle` (or `settings.gradle` for newer versions of Gradle):\n\n```gradle\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\n```\nor for `settings.gradle.kts`\n\n```kotlin\nrepositories { \n    maven { url = uri(\"https://jitpack.io\") }\n}\n```\n\n### Step 2: Add Dependency\n\nAdd the following dependency to your module-level `build.gradle`:\n\n```gradle\ndependencies {\n    implementation 'com.github.styropyr0:RecyclerList:v1.0.0'\n}\n```\nor for `app:build.gradle.kts`\n\n```kotlin\ndependencies {\n    implementation(\"com.github.styropyr0:RecyclerList:v1.0.0\")\n}\n```\n\nReplace `1.0.0` with the latest release version.\n\n## Usage\n\n### XML Declaration\n\nTo use RecyclerList in your layout, declare it in XML:\n\n```xml\n\u003ccom.matrix.recycler_list.RecyclerList\n    android:id=\"@+id/recyclerList\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" /\u003e\n```\n\n### Setting Data in Kotlin\n\nBind a list of items to the RecyclerList dynamically:\n\n```kotlin\nval recyclerList = findViewById\u003cRecyclerList\u003cData\u003e\u003e(R.id.recyclerList)\nrecyclerList.apply {\n    setHasStableIds(true)\n    reverseLayout(false)\n    stackFromEnd(false)\n    setItems(dataList, R.layout.cell_layout) { view, item, index -\u003e\n        view.findViewById\u003cTextView\u003e(R.id.title).text = item.title\n        view.findViewById\u003cTextView\u003e(R.id.content).text = item.content\n        view.setOnClickListener {\n            removeItem(index)\n        }\n    }\n}\n\n// This will change the 6th element's title and content after 3s\nGlobalScope.launch {\n  delay(3000)\n  withContext(Dispatchers.Main) {\n    recyclerList.items[5] = Data(\"Title CHANGED\", \"This is the content of CHANGED\")\n    recyclerList.notifyItemChanged(5)\n  }\n}\n```\n\n### Customizing RecyclerList\n\nRecyclerList provides multiple customization options:\n\n- **Set Layout Orientation:**\n  ```kotlin\n  recyclerList.setOrientation(RecyclerView.VERTICAL)\n  ```\n\n- **Reverse Layout:**\n  ```kotlin\n  recyclerList.reverseLayout(true)\n  ```\n\n- **Stack From End:**\n  ```kotlin\n  recyclerList.stackFromEnd(true)\n  ```\n\n- **Get First/Last Visible Item Positions:**\n  ```kotlin\n  val firstVisible = recyclerList.findFirstVisibleItemPosition()\n  val lastVisible = recyclerList.findLastVisibleItemPosition()\n  ```\n\n- **Remove an Item:**\n  ```kotlin\n  recyclerList.removeItem(position)\n  ```\n\n- **Get View at a Specific Position:**\n  ```kotlin\n  val view = recyclerList.getViewAt(position)\n  ```\n\n## Callbacks\n\nRecyclerList provides callbacks for managing views dynamically:\n\n- **On View Recycled:**\n  ```kotlin\n  recyclerList.onViewRecycled { viewHolder -\u003e\n      // Handle view recycling\n  }\n  ```\n\n- **On View Attached to Window:**\n  ```kotlin\n  recyclerList.onViewAttachedToWindow { viewHolder -\u003e\n      // Handle view attached\n  }\n  ```\n\n- **On View Detached from Window:**\n  ```kotlin\n  recyclerList.onViewDetachedFromWindow { viewHolder -\u003e\n      // Handle view detached\n  }\n  ```\n\n- **On RecyclerView Attached:**\n  ```kotlin\n  recyclerList.onAttachedToRecyclerView { recyclerView -\u003e\n      // Handle RecyclerView attachment\n  }\n  ```\n\n## License\n\nRecyclerList is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyropyr0%2Frecyclerlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstyropyr0%2Frecyclerlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstyropyr0%2Frecyclerlist/lists"}