Look, I have an array of buttons that I obviously created in the "Java Code", I implemented the class of View.OnClickListener
and within the onClick method (View view) I have the following:
public void onClick(View view){
for (int x = 0; x < btnMatriz.length; x++) {
for (int i = 0; i < btnMatriz[x].length; i++) {
switch (view.getId()) {
case /** */: //Mi problema es aqui, no se como obtener el id del boton al que le di click, normalmente va R.id.idDelBoton, pero en este caso la matriz de botones no se ubican en dentro del activity_main, sino que dentro del "Codigo de Java" incluso he intentado con case btnMatriz[x][i].getId() y masbien me tira un error
break;
}
}
}}
I would like that you could help me, how to get the id of the element, at least I would like to know if I am doing it right.