Changes

Jump to: navigation, search

Android 6 Local Bound Services – A Worked Example

No change in size, 18:05, 1 February 2016
m
Text replacement - "<google>ADSDAQBOX_FLOW</google>" to "<htmlet>adsdaqbox_flow</htmlet>"
All that remains is to implement a mechanism for calling the getCurrentTime() method and displaying the result to the user. As is now customary, Android Studio will have created a template activity_local_bound.xml file for the activity containing only a TextView. Load this file into the Designer tool using Design mode, double-click on the TextView component 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”, extracting the text to a string resource named button_string. On completion of these changes, the layout should resemble that illustrated in Figure 44-1:
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
[[Image:android_studio_local_bound_ui_1.4.png]]

Navigation menu