March 2013
Beginner to intermediate
580 pages
16h 11m
English
Now that you have been introduced to MVC, let’s update GeoQuiz’s view layer to include a Next button.
In Android, objects in the view layer are typically inflated from XML within a layout file. The sole layout in GeoQuiz is defined in activity_quiz.xml. This layout needs updating as shown in Figure 2.6. (Note that we are not showing the attributes of unchanged widgets to save space.)
Figure 2.6 New button!

So the changes you need to make to the view layer are
remove the android:text attribute from the TextView.
You no longer want a hard-coded question to be part of its definition.
Give the TextView an android:id attribute. ...
Read now
Unlock full access