January 2014
Intermediate to advanced
736 pages
70h 43m
English
QuizFragment’s onCreateView method (Fig. 5.27) inflates the GUI and initializes most of the QuizFragment’s instance variables—guessRows and regionsSet are initialized when the MainActivity calls QuizFragment’s updateGuessRows and updateRegions methods. After calling the superclass’s onCreateView method (line 63), we inflate the QuizFragment’s GUI (line 64–65) using the LayoutInflater that method onCreateView receives as an argument. The LayoutInflater’s inflate method receives three arguments:
• the layout resource ID indicating the layout to inflate
• the ViewGroup (layout object) in which the Fragment will be displayed, which is received as onCreateView’s second argument
• a boolean indicating ...
Read now
Unlock full access