i have a class which is extended from a fragment ... and i want to getSupportFragmentManager() for finding the map fragment... this is the fragment xml
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context="myproject.BlankFragment">
<!-- TODO: Update blank fragment layout -->
<TextView android:layout_width="match_parent" android:layout_height="match_parent"
android:text="this is ths map " />
<fragment
android:layout_width="match_parent"
android:layout_height="match_parent" android:id="@+id/mapFrag"
tools:context="pk.edu.riu.mrcab.mrcabv1.MapsActivity"
android:name="com.google.android.gms.maps.SupportMapFragment"
/>
this is the fragment class
public class BlankFragment extends Fragment {
private GoogleMap mMap;
public BlankFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_blank, container, false);
return rootView;
}
private void setUpMapIfNeeded() {
if (mMap == null) {
mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
.getMap();
if (mMap != null) {
}
}
}