{"id":21130187,"url":"https://github.com/ismoli/DynamicRecyclerView","last_synced_at":"2025-07-09T01:32:41.847Z","repository":{"id":25207843,"uuid":"28631793","full_name":"ismoli/DynamicRecyclerView","owner":"ismoli","description":"Set of plugable extenstions for Android RecyclerView","archived":false,"fork":false,"pushed_at":"2017-04-17T09:59:07.000Z","size":75,"stargazers_count":338,"open_issues_count":2,"forks_count":42,"subscribers_count":9,"default_branch":"master","last_synced_at":"2023-11-07T15:21:47.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ismoli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-30T13:28:42.000Z","updated_at":"2023-08-13T11:23:59.000Z","dependencies_parsed_at":"2022-08-23T21:10:58.035Z","dependency_job_id":null,"html_url":"https://github.com/ismoli/DynamicRecyclerView","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismoli%2FDynamicRecyclerView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismoli%2FDynamicRecyclerView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismoli%2FDynamicRecyclerView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismoli%2FDynamicRecyclerView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismoli","download_url":"https://codeload.github.com/ismoli/DynamicRecyclerView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476373,"owners_count":17480215,"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":"2024-11-20T05:32:22.736Z","updated_at":"2024-11-20T05:32:31.078Z","avatar_url":"https://github.com/ismoli.png","language":"Java","readme":"DynamicRecyclerView\n===================\n\nSet of light and non-invasive extensions for Android RecyclerView widget. Does not use custom RecyclerView or LayoutManager.\nWith this extensions you can create RecyclerView with following features:\n\n### Drag and drop reordering.\n- Implemented using RecyclerView.OnItemTouchListener\n- Support for custom \"Drag frame\" drawable\n- ~350 LOC\n\n##### Usage:\n```java\n    dragDropTouchListener = new DragDropTouchListener(recyclerView, this) {\n        @Override\n        protected void onItemSwitch(RecyclerView recyclerView, int from, int to) {\n            adapter.swapPositions(from, to);\n            adapter.notifyItemChanged(to);\n            adapter.notifyItemChanged(from);\n \n         @Override\n         protected void onItemDrop(RecyclerView recyclerView, int position) {\n        }\n   };\n   }\n   \n    recyclerView.addOnItemTouchListener(dragDropTouchListener);\n```\n### Swipe to dismiss items\nThis is port of Roman Nurik's [SwipeToDismiss for ListView](https://github.com/romannurik/Android-SwipeToDismiss)\n- Implemented using RecyclerView.OnItemTouchListener\n- Configurable swipe directions: only left, only right, both, none\n- ~320 LOC \n\n##### Usage:\n```java\n swipeToDismissTouchListener = new SwipeToDismissTouchListener(recyclerView, new SwipeToDismissTouchListener.DismissCallbacks() {\n            @Override\n           public SwipeToDismissTouchListener.SwipeDirection canDismiss(int position) {\n               return SwipeToDismissTouchListener.SwipeDirection.RIGHT;\n           }\n            @Override\n           public void onDismiss(RecyclerView view, List\u003cSwipeToDismissTouchListener.PendingDismissData\u003e dismissData) {\n              for (SwipeToDismissTouchListener.PendingDismissData data : dismissData) {\n                  adapter.removeItem(data.position);\n                  adapter.notifyItemRemoved(data.position);\n              }\n           }\n   });\n  recyclerView.addOnItemTouchListener(swipeToDismissTouchListener);\n```\n\n### Select/activate items\n- Small RecyclerViewAdapter extension that can keep a state of selected/activated items\n\n##### Usage\nUse as normal RecyclerView.Adapter\n\n### ItemTouchListenerAdapter\nAs RecyclerView does not have standard way to add click listeners to the items, this `RecyclerView.OnItemTouchListener` intercepts touch events and translates them to simple `onItemClick()` and `onItemLongClick()` callbacks.\n\n##### Usage\n```java\n    recyclerView.addOnItemTouchListener(new ItemTouchListenerAdapter(recyclerView, this));\n```\n\n### Sample\nSample app code is included, please see [DemoActivity](app/src/main/java/com/du/android/recyclerview/sample/DemoActivity.java).\n\nFor full featured demo of real app see [/du:/ tasks app](https://play.google.com/store/apps/details?id=com.du.android) on Google Play Store\n\n","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismoli%2FDynamicRecyclerView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismoli%2FDynamicRecyclerView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismoli%2FDynamicRecyclerView/lists"}