Advertisement
Guest User

Images

a guest
Jan 2nd, 2015
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. package com.anesthetize.deliveryappl;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.Random;
  5.  
  6. public class Images {
  7.  
  8.     private Random randNo;
  9.     private ArrayList<Integer> imageId;
  10.  
  11.     public Images() {
  12.         imageId = new ArrayList<Integer>();
  13.         imageId.add(R.drawable.a1);
  14.         imageId.add(R.drawable.a2);
  15.         imageId.add(R.drawable.a3);
  16.         imageId.add(R.drawable.a4);
  17.         imageId.add(R.drawable.a5);
  18.     }
  19.  
  20.     public int getImageId() {
  21.         randNo = new Random();
  22.         return imageId.get(randNo.nextInt(imageId.size()));
  23.     }
  24.  
  25.     public ArrayList<Integer> getImageItem() {
  26.         return imageId;
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement