Skip to content

Instantly share code, notes, and snippets.

@ssaurel
Last active March 20, 2018 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssaurel/6229d3835afe890ed9391e06c9d3131a to your computer and use it in GitHub Desktop.
Save ssaurel/6229d3835afe890ed9391e06c9d3131a to your computer and use it in GitHub Desktop.
Constructor for the PianoView
public PianoView(Context context, AttributeSet attrs) {
super(context, attrs);
black = new Paint();
black.setColor(Color.BLACK);
white = new Paint();
white.setColor(Color.WHITE);
white.setStyle(Paint.Style.FILL);
yellow = new Paint();
yellow.setColor(Color.YELLOW);
yellow.setStyle(Paint.Style.FILL);
soundPlayer = new AudioSoundPlayer(context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment