Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

setDragScale method in OnSwipe only accepts integer values #833

Open
chandruscm opened this issue Jul 15, 2023 · 0 comments
Open

setDragScale method in OnSwipe only accepts integer values #833

chandruscm opened this issue Jul 15, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@chandruscm
Copy link

When programmatically adding an OnSwipe behaviour to a Motion Layout Transition, the dragScale cannot be set to values less than 1 since the public setDragScale method only accepts an integer.

// ../constraintlayout/motion/widget/OnSwipe.java

public OnSwipe setDragScale(int dragScale) {
        mDragScale = dragScale;
        return this;
    }

The expectation would be to pass a float value as the xml attribute allows it.

The same signature is used for setDragThreshold.

Happy to create a quick PR if this is indeed unintended.

@chandruscm chandruscm added the bug Something isn't working label Jul 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants