A (175)

(Tuis.) #1

518 CHAPTER 14: Android Content Providers: Providing Data to Applications



  1. To generate the activity_contact.xml file, right-click on the /res/layout folder
    and select the New ➤ Android XML File menu sequence. This will invoke
    the New Android XML File dialog, shown in Figure 14-4. Name the file
    activity_contact and select the TableLayout container as the root element in
    the dialog, as shown.


Figure 14-4. Use the New ➤ Android XML File dialog to create a named activity_contact.xml


Figure 14-3. Copy an onCreate( ) method and change the setContentView( ) method to reference activity_contact

Free download pdf