60.3 Designing the User Interface
The main activity will contain a single button, the purpose of which is to create and issue an intent. Locate and load the activity_main.xml file into the Layout Editor tool and delete the default TextView widget.
With Autoconnect enabled, drag and drop a Button object from the panel onto the center of the layout canvas as illustrated in Figure 60-6.
With the Button widget selected in the layout, use the Attributes panel to configure the onClick property to call a method named sendNotification.
Figure 60-6
Select the Button widget, change the text property in the Attributes tool window to “Notify” and extract the property value to a string resource.