title: Preloading all images when app starts
body: <p>I'm attempting to make a simple game of Pairs for Android.</p>
  
  <p><b>Program Structure</b></p>
  
  <p>Menu.java (Menu activity initially loaded)</p>
  
  <p>Game.java (Game activity, started by Menu) <br>
  GameThread.java (Handles gameloop, calls render process in GameView) <br>
  GameView.java (Handles all drawing to the screen) <br></p>
  
  <p>Graphics.java (Stores loaded images)</p>
  
  <p><b>The Problem</b></p>
  
  <p>The problem is that loading all the bitmaps I require for the Game activity takes up to 2 seconds, as there are many images required to animate a set of 15 cards. In order to avoid a large loading time between the Menu and Game activities I was thinking of preloading all of the bitmaps required into the Graphics class, in a new thread when the app first starts (Menu activity), and showing some sort of loading animation.</p>
  
  <p>Then as I can't pass the Graphics store from the Menu activity to the Game activity I would need to make it a static object in the Menu activity in order to access it from the Game activity (using Menu.graphics...). Is this a terrible way of doing it? I always thought using static objects was a bad idea? What other options do I have?</p>
  
  <p>Thanks for your help in advance.</p>