{"id":18975023,"url":"https://github.com/bufferapp/multiactionswipehelper","last_synced_at":"2025-02-24T20:54:22.252Z","repository":{"id":79937293,"uuid":"155575060","full_name":"bufferapp/MultiActionSwipeHelper","owner":"bufferapp","description":"An Android RecyclerView Swipe Helper for handling multiple actions per direction","archived":false,"fork":false,"pushed_at":"2020-06-22T16:01:17.000Z","size":3909,"stargazers_count":295,"open_issues_count":2,"forks_count":11,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-02-09T05:51:29.348Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bufferapp.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":"2018-10-31T14:53:46.000Z","updated_at":"2025-01-07T05:41:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"e29e3246-75b2-4e28-8662-47a31506bbc3","html_url":"https://github.com/bufferapp/MultiActionSwipeHelper","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"d81c2c7c8b6cc45a76b7cd580aaa3e0679dcea8e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2FMultiActionSwipeHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2FMultiActionSwipeHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2FMultiActionSwipeHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2FMultiActionSwipeHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bufferapp","download_url":"https://codeload.github.com/bufferapp/MultiActionSwipeHelper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240557488,"owners_count":19820358,"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-08T15:17:05.014Z","updated_at":"2025-02-24T20:54:22.232Z","avatar_url":"https://github.com/bufferapp.png","language":"Java","readme":"# MultiActionSwipeHelper\nAn Android RecyclerView Swipe Helper for handling multiple actions per direction. The helper allows you to have 4 items in total:\n\n- Short left swipe\n- Long left swipe\n- Short right swipe\n- Long right swipe\n\n\n![demo](https://github.com/bufferapp/MultiActionSwipeHelper/blob/master/art/demo.gif?raw=true)\n\nSample app coming soon!\n\n# Usage\n\nThe setup is fairly straightforward and requires little code. To begin with, you need to create a list of [SwipeAction](https://github.com/bufferapp/MultiActionSwipeHelper/blob/master/app/src/main/java/org/buffer/android/multiactionswipehelper/SwipeAction.kt) instances - these all provide information around the details for the display of the action (label, icon, color etc)\n\n    val swipeActions = listOf\u003cSwipeAction\u003e()\n  \n Next you need to create an instance of the [SwipeToPerformActionCallback](https://github.com/bufferapp/MultiActionSwipeHelper/blob/master/app/src/main/java/org/buffer/android/multiactionswipehelper/SwipeToPerformActionCallback.kt) class, this handles the magic around the display of the current action, as well as passing back which action should be performed when an item is swiped.\n\n    val swipeHandler = SwipeToPerformActionCallback(swipeListener, some_margin_value, it)\n    \nFinally, create an instance of the [SwipePositionItemTouchHelper](https://github.com/bufferapp/MultiActionSwipeHelper/blob/master/app/src/main/java/org/buffer/android/multiactionswipehelper/SwipePositionItemTouchHelper.java) class and attach it to your recycler view:\n\n    SwipePositionItemTouchHelper(swipeHandler).attachToRecyclerView(recycler_conversations)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Fmultiactionswipehelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbufferapp%2Fmultiactionswipehelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Fmultiactionswipehelper/lists"}