Updating the View Layer
Now that you have been introduced to MVC, you are going to 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_main.xml. This layout needs to be updated as shown in Figure 2.5. (Note that to save space we are not showing the attributes of unchanged widgets.)
Figure 2.5 New button!
So the changes you need to make to the view layer are:
Give the TextView an
android:idattribute. This widget will need a resource ID so that you can set its text in MainActivity ...