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

Added error and filled states for pin view lines #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rprunskas
Copy link

No description provided.

@rprunskas rprunskas changed the base branch from master to develop March 29, 2021 13:12
@rprunskas rprunskas changed the base branch from develop to master March 29, 2021 13:14
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copyright must start on a new line.

} else {
mPaint.setColor(filled ? getLineColorForState(FILLED_STATES) : mCurLineColor);
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use a local variable to save the color, so we only need to write setColor once.

Like:

color = mCurLineColor;
if (isError) {
    color = getLineColorForState(ERROR_STATES);
} else if (highlight) {
    color = getLineColorForState(HIGHLIGHT_STATES);
} else if (filled) {
    color = getLineColorForState(FILLED_STATES);
}
mPaint.setColor(color);

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

Successfully merging this pull request may close these issues.

None yet

3 participants