Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7: Rewriting Your First Project > Building and Running the Activity

Building and Running the Activity

To build the activity, use your IDE's built-in Android packaging tool, or run ant clean install in the base directory of your project (as described in Chapter 3). Then, run the activity. It should be launched for you automatically if you are using Eclipse; otherwise, find the activity in the home screen launcher. You should see an activity akin to what's shown in Figure 7–1.

images

Figure 7–1. The Now demonstration activity

Clicking the button—in other words, clicking pretty much anywhere on the device'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 will be covered in a later chapter.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint