Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants