I created a class that contains a method that generates a random number from 0 to 61 ... in my Fragment
I instantiated within my button
event ... My question is, how do I do to put the amount of times it will generate for me. For example, I have spinner
with options 1,2,3 so I choose 2, when I click on the button it has to generate for me:
1st = 25 2 = 50
this all at the same time
How would I do it? because if I create each method for the amount of times is difficult, because imagine if the user wants 100 times, then complicates. So how would I do this, I do not have the slightest idea, could anyone help me?
Code:
public void geraSix(){
MegaSenaController numberRandom = new MegaSenaController();
numberRandom.megaSena();
String groupFirst = numberRandom.getPrimary();
groupText.setText(groupFirst);
}