TL DR These lines made my load on the map.
itemMap.onResume();
mapView.onEnterAmbient(null);
For people having the same problem:
RecyclerView, , racula, ArrayList MapView, mapView , .
Activity mapViewList . , .
@Override
protected void onResume() {
super.onResume();
for(MapView mapView : adapter.getMapViewList()){
if (mapView != null){
mapView.onResume();
}
}
}
, , "itemMap.onResume();" "mapView.onEnterAmbient(null);" , .
Adapter
class ReminderAdapter extends RecyclerView.Adapter<ReminderAdapter.MyViewHolder> {
private ArrayList<MapView> mapViewList;
@Override
public RecyclerViewAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_layout, parent, false);
return new MyViewHolder(itemView);
}
@Override
public void onBindViewHolder(final ReminderAdapter.MyViewHolder holder, int position) {
(...)
holder.initializeMapView(new LatLng(getLat(), getLng()));
}
ArrayList<MapView> getMapViewList(){
return mapViewList;
}
(...)
class MyViewHolder extends RecyclerView.ViewHolder implements OnMapReadyCallback{
@Override
public void onMapReady(GoogleMap googleMap) {
MapsInitializer.initialize(context);
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15f));
googleMap.addMarker(new MarkerOptions().position(latLng));
this.googleMap = googleMap;
itemMap.onResume();
itemMap.onEnterAmbient(null);
}
void initializeMapView(LatLng latLng){
if(itemMap != null){
this.latLng = latLng;
itemMap.onCreate(bundle);
itemMap.getMapAsync(this);
mapViewList.add(itemMap);
}
}
}
}