Beispiel #1
0
 /** Load the images into memory. */
 public static void LoadImages(Context context) {
   if (images != null) {
     return;
   }
   images = new Bitmap[13];
   Resources res = context.getResources();
   images[2] = BitmapFactory.decodeResource(res, R.drawable.two);
   images[3] = BitmapFactory.decodeResource(res, R.drawable.three);
   images[4] = BitmapFactory.decodeResource(res, R.drawable.four);
   images[6] = BitmapFactory.decodeResource(res, R.drawable.six);
   images[8] = BitmapFactory.decodeResource(res, R.drawable.eight);
   images[9] = BitmapFactory.decodeResource(res, R.drawable.nine);
   images[12] = BitmapFactory.decodeResource(res, R.drawable.twelve);
 }
Beispiel #2
0
 public MyView(Context context) {
   super(context);
   mBack = BitmapFactory.decodeResource(context.getResources(), R.drawable.family);
   mHandler.sendEmptyMessageDelayed(0, DELAY);
 }