title: Custom InfoWindow only showing last element of list in android
body: <pre><code>public void marker1(final List&lt;String&gt; listName,
          final List&lt;String&gt; listIllness, final List&lt;String&gt; listIC,
          final List&lt;String&gt; listElderlyimage, List&lt;String&gt; listArduinomac,
          List&lt;String&gt; listLat, List&lt;String&gt; listLong) {
  
  
      Log.e("", Integer.toString(listName.size()));
      for (int i = 0; i &lt; listName.size(); i++) {
          name = listName.get(i);
          ic = listIC.get(i);
          illness = listIllness.get(i);
          Double Lat = Double.parseDouble(listLat.get(i));
          Double Long = Double.parseDouble(listLong.get(i));
          MarkerOptions marker = new MarkerOptions().position(new LatLng(Lat,
                  Long));
  
          marker.icon(BitmapDescriptorFactory
                  .defaultMarker(BitmapDescriptorFactory.HUE_VIOLET));
  
  
          infoWindowAdapter = new MarkerInfoWindowAdapter();
          googleMap.setInfoWindowAdapter(infoWindowAdapter);
          infoWindowAdapter.setName(name);
          infoWindowAdapter.setIC(ic);
          infoWindowAdapter.setIllness(illness);
          googleMap.addMarker(marker);
  
  
      }// for loop
  
  }// marker1
  </code></pre>
  
  <p>This is the custom infowindowadapter that i use </p>
  
  <pre><code>class MarkerInfoWindowAdapter implements InfoWindowAdapter {
  
      private View inflatedView;
      private String name, ic, illness;
  
      public void setName(String name) {
          this.name = name;
      }
  
      public void setIC(String ic) {
          this.ic = ic;
      }
  
      public void setIllness(String illness) {
          this.illness = illness;
      }
  
      MarkerInfoWindowAdapter() {
          inflatedView = getActivity().getLayoutInflater().inflate(
                  R.layout.custom_info_contents, null);
  
      }
  
      @Override
      public View getInfoContents(Marker marker) {
          setInfo(marker, inflatedView);
          return inflatedView;
      }
  
      @Override
      public View getInfoWindow(Marker marker) {
          setInfo(marker, inflatedView);
          return inflatedView;
      }
  
      private void setInfo(Marker marker, View view) {
          TextView txtname = (TextView) view
                  .findViewById(R.id.txtPatientName);
          TextView txtIC = (TextView) view.findViewById(R.id.txtIC);
          TextView txtIllness = (TextView) view.findViewById(R.id.txtIllness);
          txtname.setText(name);
          txtIC.setText(ic);
          txtIllness.setText(illness);
          Log.e("&lt;&gt;", txtname.toString());
      }
  }
  </code></pre>
  
  <p>Hi there, i am not sure why whenever i click on the marker, it keeps on showing the same person information. I am not sure where went wrong. Please help me! Thank you.</p>