I am wondering why function setupAdapter() has been called two times in PhotoGalleryFragment.java? The first time was called in Listing. 26.13 and later it then was called in Listing 26.14. As explained in the text, onPostExecute() is run on the main thread. Why setupAdapter() was called by onCreatView() again?
Could anyone can help to explain. Thanks.