I am new to Android and learning to create fragments in Android by following this example: Fragment Navigation Drawer
The code between N
An Activity has no getActivity() method. Fragments have.
getActivity()
Because getActivity() says: "return the Activity which contains me".
And while Framents are contained in Activities, Activities themselves aren't.