how to use fragment maps in navigation drawer? I am trying to use but the error, so I possessed three chronological list that contains the display maps, I created two more yet or is empty. when I opened the first road maps well after I select the list view both appear blank activity was not a problem, and when I want to go back to the case where the application maps directly out ..
public class CreateFragment extends Fragment {
public CreateFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_create, container, false);
return rootView;
}
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<fragment
android:id="@+id/fragment1"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
</RelativeLayout>
See Question&Answers more detail:os