Private MapView mMapView=null;
@ Override
Public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
SDKInitializer. The initialize (getActivity (). GetApplicationContext ());
View the View=inflater. Inflate (R.l ayout. Fragment_navigation, container, false);
MMapView=(MapView) view. The findViewById (R.i db aidumap); Return the view;
}
@ Override public void onResume () {
Super. OnResume ();
.//in the Fragment executed when onResume mMapView onResume (), map lifecycle management mMapView. OnResume ();
}
@ Override
Public void onPause () {
Super. OnPause ();
MMapView. OnPause ();
}
@ Override
Public void onDestroy () {
Super. OnDestroy ();
MMapView. OnDestroy ();
}
}
This code by baidu map development documentation activities, after the operation without error, but bad interface, normal logcat print information, help children


CodePudding user response:
Activity add fragments way preloaded patterns you are this wayCodePudding user response:
No, preload how to implementCodePudding user response: