In the “ActionBarTabsPager” tutorial, getActivity returns null
问题 I have successfully implemented the tutorial: http://developer.android.com/reference/android/support/v4/view/ViewPager.html, as a Tab'ed viewpager activity with fragments on each tab. Each Fragment maintains various UI TextFields etc and everything is working fine with the exception of getActivity(), which returns null when called from any of the fragments. UPDATE: Read this, then please see my own answer below that broadens the scope regarding the cause of this error. Continued: BUT, the