83.5 Designing the User Interface
Once the new project has been created, select the activity_main.xml file from the Project tool window and with the Layout Editor tool in Design mode, select the “Hello World!” TextView and delete it from the layout.
Drag and drop three Button views onto the layout. The positioning of the buttons is not of paramount importance to this example, though Figure 83-1 shows a suggested layout using a vertical chain.
Configure the buttons to display string resources that read Play, Record and Stop and give them view IDs of playButton, recordButton, and stopButton respectively.
Select the Play button and, within the Attributes panel, configure the onClick property to call a method named playAudio when selected by the user. Repeat these steps to configure the remaining buttons to call methods named recordAudio and stopAudio respectively.
Figure 83-1