i have written the code to have google maps in one of my fragments(tabs) and i seem to be having a problem with the on map read call back, its saying its unused import statement. all my libraries have been compiled, i have synced the gradle and it still wont work, i'm still new to android so this isn't my strongest area.
here is my code below
package com.example.hp_user.shoutfinal28;
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.MapFragment;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
public class FragmentShouts_Maps extends Fragment implements onMapReadyCallback { View view = inflater.inflate(R.layout.fragmentshouts_maps, container, false);
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Get the view from fragment shouts.xml
return inflater.inflate(R.layout.fragmentshouts_maps, container, false);
MapFragment fragment = (MapFragment)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 the xml file where i declare maps
<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:layout_alignParentEnd="true">
</fragment>
</RelativeLayout>