Android Programming The Big Nerd Ranch Guide, 3rd Edition

(Brent) #1
Laying Out the UI

11

Figure 1.10 shows how these widgets compose QuizActivity’s interface.


Figure 1.10  Planned widgets as seen on screen


Now you need to define these widgets in activity_quiz.xml.


In the project tool window, find the app/res/layout directory, reveal its contents, and open
activity_quiz.xml. Make the changes shown in Listing 1.2. The XML that you need to delete is
struck through, and the XML that you need to add is in bold font. This is the pattern we will use
throughout this book.


http://www.ebook3000.com

Free download pdf