Skip to content

Suggestion - Extend ISwipeable #1008

@MFlisar

Description

@MFlisar

About this issue

I want to distinguish between items the do allow swipe left / swipe right / both. Currently I can only distinguish can swipe / can not swipe.

My suggestion is to extend the ISwipeable interface:

interface ISwipeable {
    /** @return true if swipeable */
    val isSwipeable: Boolean

    /** @return true if the provided direction is supported */
    fun isDirectionSupported(direction: Int) : Boolean = true
}

What do you think about this? It's a very small and backwards compatible change with the default implementation inside the interface. isDirectionSupported will only be called if isSwipeable return true.

Details

  •  Used library version: 5.4.1
  •  Used support library version: androidx

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions