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
  • DownloadDownload
  • PrintPrint

8.1. Introducing Toast

For this example, you’ll create a simple interface that has two buttons that pop up a message, called a Toast, on the screen. A Toast is a simple, nonpersistent message designed to alert the user of an event. Toasts are a great way to let a user know that a call is coming in, an SMS or email has arrived, or some other event has just happened. Toasts are designed to take up minimal space, allowing the user to continue to interact with the system without having to stop what they’re doing. Toasts, after popping up, fade away without user intervention. A Toast is different from a message, such as a status bar notification, which persists even when a phone is turned off or until the user selects the notification or the Clear Notification button.

First let’s define a simple layout.


  

You are currently reading a PREVIEW of this book.

                                                                                        

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

  

Start a Free Trial