Viewing the guest list

Now that we have implemented the RSVP_Screen, we have a way for guests to send RSVPs and aggregate all the RSVPs from different guests into the Fusion Table. In any event organization app, it is helpful for others to be able to see a list of guests who have already RSVP'ed.

The purpose of the GuestList_Screen is just that—enabling all attendees (and the organizer) to see who else is coming to the event. To display information gathered in the Fusion Table, we will use a Label. In the Designer window, navigate to the GuestList_Screen. Just like in the RSVP_Screen, first drag a VerticalArragment to the top portion of the GuestList_Screen, above the HorizontalArrangement, which contains all the navigation buttons. Make the BackgroundColor property in VerticalArrangement to None. Also set both the Height and Width properties to Fill parent. Now drag a Label component into the VerticalArrangement. Rename the Label GuestListLabel. Change the BackgroundColor property of GuestListLabel to None. Change the FontSize property to 18 (you might have to try various values for this property depending on your device's screen size and screen resolution). Finally, change the TextColor property to White. Then add a FusiontablesControl component just like you did in the RSVP_Screen. You can view the changes in the following screenshot:

Viewing the guest list

Just like in the RSVP_Screen. We will change the three properties of the FusiontablesConrol1 component. Since you already know how to change the three FusiontablesControl1 properties—KeyFile, ServiceAccountEmail, and UseServiceAuthentication—we will not go into the details here. Just follow the steps that we completed in the Connecting the app to the Google Fusion Table section.

Whereas in the RSVP_Screen, the app sends information to the Fusion Table, in the GuestList_Screen, the app is requests information from the Fusion Table, receives it and then displays it. To program this, head to the Blocks editor.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset