Time for action - creating a contact editor
This example requires that some of the user interface elements are declared out-of-order (as discussed earlier). We'll also include Save and Cancel
Button widgets at the bottom of the screen. This example goes back to declaring the user interface in a resource XML file rather than writing it in Java code. For this example, you'll need a placeholder image for the user's contact photo. A 64 x 64 pixel PNG file is about the right size to work with (I used a big smiley image).
- Start by creating a new XML layout file named
res/layout/relative_layout.xml. Open this file in your editor or IDE.
- Declare the root element as a full-screen
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" ...