Android Programming The Big Nerd Ranch Guide, 3rd Edition
From Layout XML to View Objects 17 From Layout XML to View Objects How do XML elements in activity_quiz.xml become View objects? ...
Chapter 1 Your First Android Application 18 Resources and resource IDs A layout is a resource. A resource is a piece of your ap ...
Resources and resource IDs 19 Listing 1.5 Current GeoQuiz resource IDs (R.java) /* AUTO-GENERATED FILE. DO NOT MODIFY. This ...
Chapter 1 Your First Android Application 20 Your strings also have resource IDs. You have not yet referred to a string in code, ...
Wiring Up Widgets 21 Wiring Up Widgets Now that the buttons have resource IDs, you can access them in QuizActivity. The first st ...
Chapter 1 Your First Android Application 22 Getting references to widgets In an activity, you can get a reference to an inflate ...
Setting listeners 23 Setting listeners Android applications are typically event driven. Unlike command-line programs or scripts, ...
Chapter 1 Your First Android Application 24 Using anonymous inner classes This listener is implemented as an anonymous inner cl ...
Making Toasts 25 Making Toasts Now to make the buttons fully armed and operational. You are going to have a press of each button ...
Chapter 1 Your First Android Application 26 The Context parameter is typically an instance of Activity (Activity is a subclass ...
Running on the Emulator 27 Running on the Emulator To run an Android application, you need a device – either a hardware device o ...
Chapter 1 Your First Android Application 28 On the next screen, choose a system image that your emulator is based on. For this ...
Running on the Emulator 29 Figure 1.17 Updating emulator properties Once you have an AVD, you can run GeoQuiz on it. From the A ...
Chapter 1 Your First Android Application 30 Keep the emulator running – you do not want to wait for it to launch on every run. ...
Android build tools 31 (You can also create your view classes programmatically in the activity instead of defining them in XML. ...
Chapter 1 Your First Android Application 32 Challenges Challenges are exercises at the end of the chapter for you to do on your ...
33 2 Android and Model-View- Controller In this chapter, you are going to upgrade GeoQuiz to present more than one question, as ...
Chapter 2 Android and Model-View-Controller 34 Creating a New Class In the project tool window, right-click the com.bignerdranc ...
Generating getters and setters 35 Generating getters and setters The first step is to configure Android Studio to recognize the ...
Chapter 2 Android and Model-View-Controller 36 Listing 2.2 Generated getters and setters (Question.java) public class Question ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf