title: Random activity without repetition
body: <p>I already read hundreds of posts here about it but none is adapted to my simple needs. <strong>NOOB ALERT</strong>.</p>
  
  <p>I'm trying to have a notification in my app choose from a list of activities and open one of them randomly but without repetition, I was able to have a randomized effect but some activities pop up many times and others don't.</p>
  
  <p>So basically what I need is to go over all the activities on the list randomly, and when all of them have been visited, re-shuffle the list and start over</p>
  
  <p>Here's a little example I cooked up: one button that takes me to 10 activities:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          Button randomBtn;
          randomBtn = (Button) findViewById(R.id.randomBtn);
          randomBtn.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  ArrayList&lt;Class&gt; activities = new ArrayList&lt;&gt;();
                  activities.add(Activity01.class);
                  activities.add(Activity02.class);
                  activities.add(Activity03.class);
                  activities.add(Activity04.class);
                  activities.add(Activity05.class);
                  activities.add(Activity06.class);
                  activities.add(Activity07.class);
                  activities.add(Activity08.class);
                  activities.add(Activity09.class);
                  activities.add(Activity10.class);
  
                  Collections.shuffle(activities);
  
                  Intent intent = new Intent(MainActivity.this, activities.get(0));
                  startActivity(intent);
  
              }
          });
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>The results are like this:
  First run: <strong>04</strong>, <strong>07</strong>, <strong>07</strong>, 05, 03, <strong>09</strong>, 06, <strong>09</strong>, <strong>04</strong>, 01</p>
  
  <p>Second run: 07, 04, <strong>10</strong>, <strong>02</strong>, <strong>05</strong>, 06, <strong>10</strong>, <strong>05</strong>, <strong>02</strong>, 08.</p>
  
  <p>I just can't seem to find it.</p>
  
  <p>Thank you in advance.</p>