dimanche 26 mai 2019

How do I generate random string array urls without repeating?

I am trying to generate random string array urls in picasso, everything is working fine but it repeats, like i had 28 string array items when i start app some items are repeating but i want only 1 item at one time when random start

This is my code

     ImageView imageView = itemView.findViewById(R.id.imageview);
        random = new Random(); 
        int p=  random.nextInt(icons.length);
        Picasso.get().load(icons[p]).into(imageView);




Aucun commentaire:

Enregistrer un commentaire