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

ondraw绘制顺序调整建议,目前先绘制item后绘制Curtain,drawIndicator会导致选中项被遮盖颜色值变浅 #304

Open
DancingDuck opened this issue May 31, 2022 · 0 comments

Comments

@DancingDuck
Copy link

@Override
protected void onDraw(Canvas canvas) {
    if (null != onWheelChangedListener) {
        onWheelChangedListener.onWheelScrolled(this, scrollOffsetYCoordinate);
    }
    if (itemHeight - halfDrawnItemCount <= 0) {
        return;
    }
    drawAllItem(canvas);
    drawCurtain(canvas);
    drawIndicator(canvas);
}

调整为
@OverRide
protected void onDraw(Canvas canvas) {
if (null != onWheelChangedListener) {
onWheelChangedListener.onWheelScrolled(this, scrollOffsetYCoordinate);
}
if (itemHeight - halfDrawnItemCount <= 0) {
return;
}
drawCurtain(canvas);
drawIndicator(canvas);
drawAllItem(canvas);
}

liyujiang-gzu added a commit that referenced this issue Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant