dimanche 16 juillet 2017

how can i shuffle some elements of an array in Android Studio?

i'm having a problem with shuffling an array , how can i shuffle some elements and skip some?

for Example .. if i have 6 buttons each one takes its text from my array.

if i click the correct answer .. my button will be invisible , ok ?

  String[] myarray = {"Dog","Cat","Horse","lion","Fish","Brid"};

now , when i shuffle the array, i don't wanna see all the elements ! i wanna to remove the correct answer that has been choosed.. or .. skip it. how can i do that with Collection.shuffle?

that's my app please take a look to understand my point




Aucun commentaire:

Enregistrer un commentaire