Android Programming The Big Nerd Ranch Guide, 3rd Edition
Model-View-Controller and Android 37 Model-View-Controller and Android Notice that the objects in Figure 2.4 are separated into ...
Chapter 2 Android and Model-View-Controller 38 Figure 2.5 shows the flow of control between objects in response to a user event ...
Updating the View Layer 39 Updating the View Layer Now that you have been introduced to MVC, you are going to update GeoQuiz’s v ...
Chapter 2 Android and Model-View-Controller 40 Listing 2.3 New button... and changes to the text view (activity_quiz.xml) < ...
Updating the Controller Layer 41 Return to activity_quiz.xml and preview your layout changes in the graphical layout tool. That ...
Chapter 2 Android and Model-View-Controller 42 First, get a reference for the TextView and set its text to the question at the ...
Updating the Controller Layer 43 You now have code in two separate places that updates the mQuestionTextView variable. Take a mo ...
Chapter 2 Android and Model-View-Controller 44 In QuizActivity.java, add the implementation of checkAnswer(boolean) shown in Li ...
Updating the Controller Layer 45 Within the button’s listeners, call checkAnswer(boolean), as shown in Listing 2.11. Listing 2.1 ...
Chapter 2 Android and Model-View-Controller 46 Running on a Device In this section, you will set up your system, device, and ap ...
...
...
...
...
...
...
...
...
...
...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf