2.5.1. Adding Images to the Project

For this app, you’ll need to add the Deitel bug image (bug.png) and the Android logo image (android.png) to the project. These are located with the book’s examples in the images folder’s Welcome subfolder. File names for image resources—and all the other resources you’ll learn about in later chapters—must be in all lowercase letters.

Because Android devices have various screen sizes, resolutions and pixel densities (that is, dots per inch or DPI), you typically provide images in varying resolutions that the operating system chooses based on a device’s pixel density. For this reason your project’s res folder contains several subfolders that begin with the name drawable. These folders store images with different ...

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.