I want to generate random numbers from 1 to 9 and show each number in a different TextView (It is for a sudoku)
I have nine TextViews.
private TextView textView1;
private TextView textView2;
private TextView textView3;
private TextView textView4;
private TextView textView5;
private TextView textView6;
private TextView textView7;
private TextView textView8;
private TextView textView9;
public void generateNumbers() {
// Random numbers int numbers =
textView1.setText();
textView2.setText();
textView3.setText();
textView4.setText();
textView5.setText();
textView6.setText();
textView7.setText();
textView8.setText();
textView9.setText();
}
In some squares I need to show 3 numbers and in other squares 4 numbers
Aucun commentaire:
Enregistrer un commentaire