Bitmap Files

Android supports bitmap resource files in a few different formats: png (preferred), jpg (acceptable), gif (discouraged). The bitmap file itself is compiled and referenced by the file name without the extension (so res/drawable/my_picture.png would be referenced as R.drawable.my_picture).

Source file formats: png (preferred), jpg (acceptable), gif (discouraged). One resource per file. Resource file location: res/drawable/some file .png Compiled resource datatype: Resource pointer to a BitmapDrawable. Resource reference name:

For more discussion and examples using drawable resources, see the discussion in 2D Graphics.

0 0

Post a comment