Changes

Jump to: navigation, search

Android Local Bound Services – A Worked Example

No change in size, 16:34, 4 July 2014
Completing the Example
== 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_boundfragment_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 32-1:
<google>ADSDAQBOX_FLOW</google>

Navigation menu