338 CHAPTER 9: Android Graphic Design: Making Your UI Designs Visual
Figure 9-23. Use a File ➤ Export As menu sequence to access the Export Image dialog, to save the first ImageButton
Creating Five Resolution Density Button Versions
The next series of “moves” in our work process for creating the five different resolution densities will
involve using the Image Scale algorithm in GIMP, as well as the Undo feature, so that we can scale
from the original 500-pixel version (XXHDPI) down to each of the lower resolution levels of XHDPI,
HDPI, MDPI, and LDPI.
- To save out the XXHDPI version of the default or normal ImageButton
state, use the File ➤ Export As menu sequence, and name your file
imagebutton1normal.png using the required (by Android) lowercase letters
and numbers, as is shown in Figure 9-23. Notice in the Save in folder
area of the dialog that I am saving the digital image asset directly into the
HelloUniverse resource folder in the /drawable-xxhdpi subfolder. Use the
Export button once you have named the file (be sure to include the .png file
extension to tell GIMP what format to use to save the file during the export
operation). - Use the Image ➤ Scale Image menu sequence to open the Scale Image
dialog and scale the image to 256 pixels using Cubic Interpolation, as seen
in Figure 9-24. Export the image to the drawable-xhdpi folder, using the file
name that you used in Figure 9-23, as each different resolution version will
need to have the exact same file name.