mardi 5 septembre 2017

How can I make a image appear n times with n as a random number?

I have an activity with an imageview. I want to make the image appear one next to each other n times with n as a random number. How can I do this please?

<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.dell.worldofkids.cats"
android:background="@drawable/imbackround"><ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/cat"
        android:layout_gravity="center_vertical" /></RelativeLayout>

thanks in advance




Aucun commentaire:

Enregistrer un commentaire