title: MapView inside custom RecyclerViewAdapter
body: <p>I am trying to implement a RecyclerView containing CardViews with each one MapView inside. 
  The problem is, that the MapView, initialized in the custom Adapter, does not load, unless <strong>you click</strong> on it.
  As already mentioned here: <a href="https://stackoverflow.com/questions/27895696/android-mapview-does-not-load-unless-you-touch-on-the-mapview">Android MapView does not load unless you touch on the mapview</a>
  you can solve the problem by overriding the onResume().
  I have tried this the following way:</p>
  
  <pre><code>@Override
      public void onResume() {
          if(LocationsAdapter.ViewHolder.mapView != null) {
              LocationsAdapter.ViewHolder.mapView.onResume();
          }
  
          super.onResume();
      }
  </code></pre>
  
  <p>Honestly I simply had no idea how to override the onResume in any other way, please forgive me if I broke certain rules of programming here.
  I made the mapView as public static inside the ViewHolder created in the LocationsAdapter. This does not seem to work, the map is still blank.</p>
  
  <p>The ViewHolder inside the Adapter implements OnMapReadyCallback.</p>
  
  <pre><code>public static class ViewHolder extends RecyclerView.ViewHolder implements OnMapReadyCallback
  
  ...
  
   @Override
              public void onMapReady(GoogleMap googleMap) {
                  this.googleMap = googleMap;
                  Location location = locations.get(getAdapterPosition());
                  this.googleMap.addMarker(new MarkerOptions().position(location.getLatlng()).title(location.getName()));
                  this.googleMap.moveCamera(CameraUpdateFactory.newLatLng(location.getLatlng()));
                  this.googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(location.getLatlng(), 7.0f));
              }
  </code></pre>
  
  <p>These two methods are called when the ViewHolder is called.</p>
  
  <pre><code>mapView.onCreate(null);
  mapView.getMapAsync(this);
  </code></pre>
  
  <p>Another article referring to this problem is unanswered yet: <a href="https://stackoverflow.com/questions/48049682/mapview-inside-cardview-not-load-the-map">mapView inside cardview not load the map</a>.</p>
  
  <p>My goal is, to load the map no matter what lifecycle the fragment is currently in.
  I assume you will neither need the Adapter, the Fragment nor the XML for this problem. If you do though, let me know please.</p>