android pick random images?
<p>How can i load a random image out of 2 ?</p>

<p>I tried this code</p>

<pre><code>final Random rgenerator = new Random();
Integer [] mImageIds = 
 {
  R.drawable.mantrans,
  R.drawable.womentrans,
 };
 Integer q = mImageIds[rgenerator.nextInt(mImageIds.length)];
 gBall1 = BitmapFactory.decodeResource(getResources(), q);
</code></pre>

<p>but it did not work...</p>

<p>Please help</p>
