Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
onDraw method of the PianoView for the SSaurel's Channel
@Override
protected void onDraw(Canvas canvas) {
for (Key k : whites) {
canvas.drawRect(k.rect, k.down ? yellow : white);
}
for (int i = 1; i < NB; i++) {
canvas.drawLine(i * keyWidth, 0, i * keyWidth, height, black);
}
for (Key k : blacks) {
canvas.drawRect(k.rect, k.down ? yellow : black);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment