I am making an Android piano app (my first) and here is my problem. I want to change the number of piano keys by pressing a specific button. Keys are declared as arrays
Button[] whiteKeys = new Button[8];
For the keys I am using View.OnClickListener
View.OnClickListener btnClicked = new View.OnClickListener() {
@Override
public void onClick(View v) {
switch(v.getId())
{
case 1:
//Here I want to change the length of my whiteKeys array from 8 to 16}
How can I do that? I am completly new to Java so this may be a bit noobish question.