Changes

Jump to: navigation, search
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<htmlet>androidstudio_a6androidstudio</htmlet>
== Designing the User Interface ==
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
Once the new project has been created, select the activity_audio_app.xml file from the Project tool window and, with the Designer 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 49-1 shows a suggested layout.
}
</pre>
<htmlet>androidstudio_a6androidstudio</htmlet>
The added code begins by obtaining references to the three button views in the user interface. Next, the previously implemented hasMicrophone() method is called to ascertain whether the device includes a microphone. If it does not, all the buttons are disabled, otherwise only the Stop and Play buttons are disabled.
<htmlet>androidstudio_a6androidstudio</htmlet>
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">

Navigation menu