Changes

Jump to: navigation, search

Android Local Bound Services – A Worked Example

4 bytes removed, 20:35, 26 June 2013
no edit summary
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="20%">[[Implementing an Android Started Service – A Worked Example|Previous]]<td align="center">[[Kindle Fire Android 4 App Development Essentials|Table of Contents]]<td width="20%" align="right">[[Android Remote Bound Services – A Worked Example|Next]]</td>
<tr>
<td width="20%">Implementing an Android Started Service – A Worked Example<td align="center"><td width="20%" align="right">Android Remote Bound Services – A Worked Example</td>
<google>BUY_KINDLE_FIREBUY_ANDROID</google>
== Completing the Example ==
All that remains is to implement a mechanism for calling the getCurrentTime() method and displaying the result to user. As is now customary, Eclipse will have created a template activity_local_bound.xml file for the activity containing only a TextView. Load this file into the Graphical Layout tool and right-click on the TextView component, select Assign ID… and change the ID to myTextView. Move the TextView to the center of the display canvas, add a Button view beneath the TextView and change the text on the button to read “Show Time”. On completion of these changes, the layout should resemble that illustrated in Figure 30 32-1:
[[Image:android_local_bound_ui2.png|The UI for an example Android Local Bound Service app]]
Figure 3032-1
<google>BUY_KINDLE_FIREBUY_ANDROID</google>
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="20%">[[Implementing an Android Started Service – A Worked Example|Previous]]<td align="center">[[Kindle Fire Android 4 App Development Essentials|Table of Contents]]<td width="20%" align="right">[[Android Remote Bound Services – A Worked Example|Next]]</td>
<tr>
<td width="20%">Implementing an Android Started Service – A Worked Example<td align="center"><td width="20%" align="right">Android Remote Bound Services – A Worked Example</td>
</table>

Navigation menu