The Android SDK lets you use bitmap graphics that have stretchable and fixed regions. These are referred to as nine-patch graphics, since they have nine distinct regions: four corners, four sides, and a center region. As a nine-patch graphic is resized or its aspect ratio is changed, it keeps the corners intact, stretches the sides, and expands the center as needed.
- [Instructor] The Android SDK let's you use…bitmap graphics that have stretchable and fixed regions.…These are referred to as nine patch graphics…since they have nine distinct regions,…four corners, four sides, and a center region.…As a nine patch graphic is resized…or it's aspect ratio is changed,…it keeps the corners in tact, stretches the sides,…and only expands the center as needed.…I'm going to be working with a file called picture_frame.png…which is in the images directory…under assets under exercise files.…
It's rectangular with a landscape orientation.…I'm going to use it in a project…as the background in an image view component.…In this project named nine patch,…the main activity's layout file has two image views.…Now in design mode I'm going to choose the Nexus seven…and then look at this in landscape view…so these appear side by side.…Both of these are image views…that are displaying a particular graphic…but are using this picture frame PNG file as the background.…
Notice that the landscape version looks pretty good,…
- Define Android market fragmentation.
- Determine how to set minimum and target platforms.
- Recognize how to implement alternative resource directories.
- Identify how to create bitmap resources.
- Demonstrate how to control a fragment using Java code.