I found the message Cannot resolve method 'getSupportFragmentManager ( )'
I want to fragment as activity.
because I want to use Maps on the tabs swipe.
public class PETAcikarangsukatani extends Fragment {
Context context;
private static final LatLng SUKATANI = new LatLng(-6.171327, 107.178108);
private static final LatLng WRPOJOK = new LatLng(-6.222411, 107.162158);
private static final LatLng PILAR = new LatLng(-6.257033, 107.156472);
private static final LatLng CIKARANG = new LatLng(-6.256073, 107.143984);
GoogleMap googleMap;
final String TAG = "PathGoogleMapActivity";
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.activity_path_google_map, container, false);
context = rootView.getContext();
SupportMapFragment fm = (SupportMapFragment)getSupportFragmentManager()
.findFragmentById(R.id.map);
googleMap = fm.getMap();
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…