Retry: Set up fragments just after setContentView().
Redo of I9e0ad079 with fix for crash on portrait.
I9e0ad079 crashed if you launched the app on portrait, because contact details
fragments don't exist in the layout.
(It worked when you rotated from landscape to portrait, because the fragment
manager would recrate them even though the layout didin't have them.)
The only change from I9e0ad079 is that we still use onAttachFragment to
initialize details fragments.
* Original CL description:
... except for ContactsUnavailableFragment, which is not in the layout.
(we dynamically create it.)
It's part of refactoring to prepare for ViewPager.
This also fixes the "mFavoritesFragment and mFrequentFragment are both
StrequentContactListFragment but we always assume StrequentContactListFragment
is Favorites in onAttachFragment" issue.
Change-Id: If30611039d8cdaa8f91676454eba67e89fcbdcc8
2 files changed