As my app (game) is getting larger and larger, I’ve started to encounter a problem.
I have a menu activity with a ‘start game’ button – when the user presses this button, it starts the main game activity – now in this activity, I’m creating bitmaps etc in the constructor but there are so many that now when the activity starts, there is a slight delay – about 2 seconds – before the game actually starts.
I’m clearly doing something wrong – please could someone advise how to get around this so the delay (which clearly, has to happen) – isn’t noticed by the user.
Load the ones you need immediately right away. Load the rest on a background thread (probably an AsyncTask). If you need one before it may be loaded, either pause or put up a loading screen as needed.