70.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 as shown in Figure 70-1. 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. Before continuing, select the “Hello World!” TextView and change the id attribute to textView and modify the text on the button to read “Notify”.
Figure 70-1