Exchange the position of button in android
<p>So what I want to achieve is to change the position of my buttons. this is my sample picture:</p>

<p><strong>Note:</strong> 
<br> My buttons have background drawable, for example sake, I just uploaded without the background images on buttons. 
<br><br><strong>Default</strong><br>
<img src="http://i.stack.imgur.com/ovkY3.png" alt="de"></p>

<p><strong>When shuffled:</strong></p>

<p><img src="http://i.stack.imgur.com/joPS5.png" alt="enter image description here"></p>

<p>So this is the code I'm working on:</p>

<pre><code>        List&lt;Integer&gt; objects = new ArrayList&lt;Integer&gt;();
        objects.add(0);
        objects.add(1);
        objects.add(2);
        objects.add(3);
        objects.add(4);

    // Shuffle the collection
    Collections.shuffle(objects);

    List&lt;Button&gt; buttons = new ArrayList&lt;Button&gt;();

    buttons.add((Button) findViewById(R.id.bObject1Stage2_1));
    buttons.add((Button) findViewById(R.id.bObject2Stage2_1));
    buttons.add((Button) findViewById(R.id.bObject3Stage2_1));
    buttons.add((Button) findViewById(R.id.bObject4Stage2_1));
    buttons.add((Button) findViewById(R.id.bObject5Stage2_1));

    Collections.shuffle(buttons);

    for (int i = 0; i &lt; objects.size(); i++) {
        //buttons.get(i).setText(objects.get(i).toString());
        buttons.get(i);
    }
</code></pre>

<p>But it's not changing the position of buttons. What am I missing in here? Any help is truly appreciated. Thanks.</p>
