Hello,
I have this loop that displays results:
for (int i = 0; i < games.length; i++) {
for (int j = 0; j < games.length; j++) {
if (i == j | i > j) {
continue;
} else {
counter++;
System.out.println(counter + " " + games + " " + games[j]);
}
}
}
Now, i want the exact thing to write into a TextView when a button is pressed, so i made this into a onClick(View v) method :
for (int i = 0; i < games.length; i++) {
for (int j = 0; j < games.length; j++) {
if (i == j | i > j) {
continue;
} else {
counter++;
result.setText(counter + " " + games + " " + games[j]);
}
}
}
Please help, I don't know how to show the same result into a TextView.
Thank you
I have this loop that displays results:
for (int i = 0; i < games.length; i++) {
for (int j = 0; j < games.length; j++) {
if (i == j | i > j) {
continue;
} else {
counter++;
System.out.println(counter + " " + games + " " + games[j]);
}
}
}
Now, i want the exact thing to write into a TextView when a button is pressed, so i made this into a onClick(View v) method :
for (int i = 0; i < games.length; i++) {
for (int j = 0; j < games.length; j++) {
if (i == j | i > j) {
continue;
} else {
counter++;
result.setText(counter + " " + games + " " + games[j]);
}
}
}
Please help, I don't know how to show the same result into a TextView.
Thank you
