A (175)

(Tuis.) #1

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


In the addGalaxyViceroy( ) method, declare a ContentValues object named viceroyContact
and then use a new keyword to call the ContentValues( ) constructor method to create the
ContentValues object, as shown in Figure 14-35.


Figure 14-34. Change the .finish( ) method call in the milkyWayButton event handler to be an addGalaxyViceroy( ) method call


Figure 14-35. Declare a ContentValues object named viceroyContact, and then call a constructor method with the new keyword

Free download pdf