lundi 29 décembre 2014

how to get random ten values after generate random number


public ImageView[] IMGS = { iv1, iv3, iv3, iv4, iv5, iv6,iv7,iv8,iv9,iv10,iv11,iv12,iv13,iv14,iv15,iv16,iv17,iv18,iv19,iv20 };

for(int i=0;i<20;i++){
IMGS[i].setVisibility(View.GONE);


}



for(int i=1;i<=10;i++) {`


Random random = new Random(); rndIndex = random.nextInt(IMGS.length);



IMGS[rndIndex].setVisibility(View.VISIBLE);


}


how to ten random value in imageViews and get dialog after ten value show or click





Aucun commentaire:

Enregistrer un commentaire