Skip to content

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.

3 participants