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

setProgress(position, velocity) always sets position to 1 #437

@PaulKlauser

Description

@PaulKlauser

Issue

Calling setProgress(position: Float, velocity: Float) always results in the layout's progress being set to 1. Looks like this is caused by always calling setPosition(1f) here:

It's not clear to me why that would be called with a value of 1f every time. If a PR removing that line would be helpful, I'm happy to do it, but it's not clear to me why that was added in the first place, the git history seems to be lost from the migration to GitHub.

Workaround

My workaround for now is to override that method locally and just call the setProgress(position: Float) overload instead, as that doesn't exhibit this behavior. Granted velocity is now being lost on that call.

Examples

MotionLayoutProgress.zip

motion_layout_progress_bug.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions