I keep getting an error on the line for the support map fragment, i am new to android and java so, do not have the answers it's saying ';' is expected, but once inserted before the get child fragment manager, it makes the support map fragment unreachable and I get an error across the whole line.
here is my class
package com.example.hp_user.shoutfinal28;
import android.app.FragmentManager;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
public class FragmentShouts_Maps extends Fragment implements OnMapReadyCallback {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Get the view from fragment shouts.xml
View view = inflater.inflate(R.layout.fragmentshouts_maps, container, false);
return view;
SupportMapFragment fragment = SupportMapFragment.newInstance(); getChildFragmentManager().findFragmentById(R.id.maps);
fragment.getMapAsync(this);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
}
@Override
public void onMapReady (GoogleMap googleMap) {
}
}
here is my xml file
<RelativeLayout 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" >
<fragment android:id="@+id/maps"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.example.hp_user.shoutfinal28.FragmentShouts_Maps"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_alignParentEnd="true">
</fragment>
</RelativeLayout>