daimajia / daimajia/AndroidSwipeLayout

Multi-view RecyclerView swipe state not maintained

Open
#127 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
12.3k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

My `RecyclerView` has two view types, only one of which has a `SwipeLayout`.

When using a `RecyclerView.Adapter` the open/closed state is not maintained.
When using a `RecyclerSwipeAdapter` the method `getSwipeLayoutResourceId` doesn't make sense.

With `RecyclerView.Adapter` I shoe-horned in a mechanism to save the open/closed state on the data being presented, but calling `swipeLayout.open(false)` doesn't work when the VH is bound to data. (`swipeLayout.open(true)` works just fine, oddly enough, but that doesn't look as good)
The open/close state is saved to the POJO when the `SwipeListener` receives the notifications (`onOpen` and `onClose`)

Do you guys have any tips for me?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.