I found the message Cannot resolve method \'getSupportFragmentManager ( )\' I want to fragment as activity. because I want to use Maps on the tabs swipe.
pub
getSupportFragmentManager()
is not part of Fragment
, so you cannot get it here that way. You can get it from parent Activity
(so in onAttach()
the earliest) using normal
activity.getSupportFragmentManager();
or you can try getChildFragmentManager(), which is in scope of Fragment, but requires API17+