Piano Chart View
Elementary and clean Android View for displaying piano chord and scale charts in music theory apps for pianists.
Sample
Installation
Step 1
Add the JitPack repository to your build file
Step 2
Add the dependency
Usage
Creating from xml:
In your layout.xml
In your arrays.xml
In your colors.xml
Editing from code:
See sample for more info
XML Attributes
Attribute | Type | Default |
---|---|---|
lightKeysColor | color | Color.WHITE |
darkKeysColor | color | Color.DKGRAY |
checkedKeysColor | color | #03A9F4 |
additionalCheckedKeysColor | color | #03A9F4 |
checkedKeys | reference (int[]) | { } |
additionalCheckedKeys | reference (int[]) | { } |
namesOfKeys | reference (String[]) | { } |
size | enum [Large, Small] | Large |
Public methods
Type | Method |
---|---|
void | setCheckedKeys(int[] numbers) |
void | setAdditionalCheckedKeys(int[] numbers) |
void | setNamesOfKeys(String... keyLetters) |
void | setSize(Size size) |
void | setLightKeysColor(int color) |
void | setDarkKeysColor(int color) |
void | setCheckedKeysColor(int color) |
void | setAdditionalCheckedKeysColor(int color) |
int[] | getCheckedKeys() |
int[] | getAdditionalCheckedKeys() |
Size | getSize() |
int | getLightKeysColor() |
int | getDarkKeysColor() |
int | getCheckedKeysColor() |
int | getAdditionalCheckedKeysColor() |