Adding the Image Resource :
First you’ll need a sample splash screen image. The “socially awkward” splash screen I’ve included is not going to win any awards, but it is a good poke at the rash of social networking applications that seem to keep cropping up in the mobile space right now.
To add this new resource, I’ve placed menu_background.jpg inside res/drawable.
Make sure a new ID is added to R.java.
It should look something like this:
public static final int menu_background=0x7f020001;
This is now your means of loading and drawing the image from within your code.
You’ll return to this concept in the next chapter on user interaction.
No comments:
Post a Comment