Skip to content

Extra Highlight #14

Open
Open
@tfe104270

Description

I used display 3 cards at the same time on RecyclerView, but I always encounter extra highlight "tail" indicator even if I already moved to next card.
After some debugging, I modify the progress variable in LinePagerIndicatorDecoration.java.

`
// on swipe the active item will be positioned from [-width, 0]
// interpolate offset for smooth animation
float progress = mInterpolator.getInterpolation(left * -1 / (float) width);

   // extra "rounding"
    if(progress < 0.02) {
        progress = 0;
    } else if (progress > 0.98) {
        // rounding, avoid extra highlighted part
        progress = 0;
        activePosition++;
    }

`
FYI.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions