Android 2.3.3
I have a table with N rows and N columns. For each row, I should add 4 buttons dynamically, and later do actions based on the button clicked. I know we
for (int i=0;i
And add this listner outside the any method and inside class
OnClickListener btnclick = new OnClickListener() {
@Override
public void onClick(View view) {
switch(view.getId()) {
case 1:
//first button click
break;
//Second button click
case 2:
break;
case 3:
//third button click
break;
case 4:
//fourth button click
break;
.
.
.
default:
break;
}
}
};