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 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 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.

 

 








Дата добавления: 2015-05-16; просмотров: 831;


Поиск по сайту:

При помощи поиска вы сможете найти нужную вам информацию.

Поделитесь с друзьями:

Если вам перенёс пользу информационный материал, или помог в учебе – поделитесь этим сайтом с друзьями и знакомыми.
helpiks.org - Хелпикс.Орг - 2014-2024 год. Материал сайта представляется для ознакомительного и учебного использования. | Поддержка
Генерация страницы за: 0.005 сек.