You are returning the ImageView
in MapFragment
's onCreateView()
. You should return mapLayout
since it is the root ViewGroup
of the hierarchy.
Also, you are calling super.onCreateView()
. By doing so, you are calling MapFragment
parent's onCreateView()
which returns null by default.
As a tip, you should avoid giving your classes names that are also shared with classes provided by the framework.