Книга: Beginning Android
Building and Running the Activity
Building and Running the Activity
To build the activity, either use your IDE’s built-in Android packaging tool, or run ant in the base directory of your project. Then, to run the activity do the following:
1. Launch the emulator (e.g., run tools/emulator
from your Android SDK installation), as shown in Figure 4-1.
Figure 4-1. The Android home screen
2. Install the package (e.g., run tools/adb install /path/to/this/example/bin/Now.apk
from your Android SDK installation).
3. View the list of installed applications in the emulator and find the Now application (see Figure 4-2).
Figure 4-2. The Android application “launcher”
4. Open that application.
You should see an activity screen like the one shown in Figure 4-3.
Figure 4-3. The Now demonstration activity
Clicking the button — in other words, clicking pretty much anywhere on the phone’s screen — will update the time shown in the button’s label.
Note that the label is centered horizontally and vertically, as those are the default styles applied to button captions. We can control that formatting, which Chapter 6 covers.
After you are done gazing at the awesomeness of Advanced Push-Button Technology, you can click the back button on the emulator to return to the launcher.
- Разработка приложений баз данных InterBase на Borland Delphi
- 4.4.4 The Dispatcher
- Open Source Insight and Discussion
- Introduction to Microprocessors and Microcontrollers
- About the author
- Chapter 6. Traversing of tables and chains
- Chapter 7. The state machine
- Chapter 8. Saving and restoring large rule-sets
- Chapter 11. Iptables targets and jumps
- Chapter 5 Installing and Configuring VirtualCenter 2.0
- Chapter 16. Commercial products based on Linux, iptables and netfilter
- Appendix A. Detailed explanations of special commands