61.2 Designing the User Interface
Load the activity_main.xml layout file into the layout tool. With Autoconnect enabled, add a Button object beneath the existing “Hello World!” label. With the Button widget selected in the layout, use the Attributes tool window to set the onClick property to call a method named sendNotification. If necessary, use the Infer Constraints button to add any missing constraints to the layout.
Figure 61-1
Before continuing, select the “Hello World!” TextView and change ID attribute to textView and modify the text on the button to read “Notify”.