January 2014
Intermediate to advanced
736 pages
70h 43m
English
Method updateRegions (Fig. 5.29) is called from the app’s MainActivity when the app is launched and each time the user changes the world regions that should be included in the quiz. Lines 126–127 use the method’s SharedPreferences argument to get the names of all of the enabled regions as a Set<String>. MainActivity.REGIONS is a constant containing the name of the preference in which the SettingsFragment stores the enabled world regions.
Read now
Unlock full access