I have 15 Images in my drawable folder and want 6 of these random images from this folder to be inserted into given locations when I open this page.
Any help will be greatly appreciated. Below is my xml
<ImageView
android:id="@+id/imageView1"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="30dp"
android:layout_marginLeft="65dp"
android:src="@drawable/circle" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/imageView1"
android:layout_marginRight="65dp"
android:src="@drawable/eclipse" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView1"
android:layout_below="@+id/imageView1"
android:layout_marginTop="52dp"
android:src="@drawable/invertedtriangle" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/imageView2"
android:layout_below="@+id/imageView1"
android:layout_marginTop="52dp"
android:src="@drawable/square" />
<ImageView
android:id="@+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView1"
android:layout_below="@+id/imageView3"
android:layout_marginTop="52dp"
android:src="@drawable/star" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView2"
android:layout_below="@+id/imageView3"
android:layout_marginTop="52dp"
android:src="@drawable/polygon" />
</RelativeLayout>
Thanks.