title: how to pass dynamic data to custom info window adapter in android?
body: <p>I am trying pass dynamic data(text and images drawables)in custom window adapter,but i am getting same data for all markers,i need different text and diffrent images to my respective markers??how to get??
  I tried below code.</p>
  
  <p>CustomInfoWindowAdapter.class</p>
  
  <hr>
  
  <pre><code>public class CustomInfoWindowAdapter implements InfoWindowAdapter {
  
      private View v;
      String selectedPath;
      LatLng latLng;
      String addtext;
      Context context;
  
      CustomInfoWindowAdapter(Context context, String addtext, String selectedPath, LatLng latLng) {
          // TODO Auto-generated constructor stub
          this.selectedPath = selectedPath;
          this.latLng = latLng;
          this.addtext = addtext;
          this.context=context;
  
      }
  
      @Override
      public View getInfoContents(Marker marker) {
          LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
          v = inflater.inflate(R.layout.infowindow,
                  null);
          ImageView icon = (ImageView) v.findViewById(R.id.icon);
          // set some bitmap to the imageview
          if (selectedPath != "") {
              Log.d("Selectedpath", "sekectedpath" + selectedPath);
              icon.setImageURI(Uri.parse(selectedPath));
          }
          TextView txt = (TextView) v.findViewById(R.id.textView1);
          txt.setText(addtext);
  
          return v;
      }
  
      @Override
      public View getInfoWindow(Marker marker) {
          // TODO Auto-generated method stub
          return null;
      }
  
  }
  </code></pre>
  
  <p>and i called CustomInfoWindowAdapter to my activity like below</p>
  
  <pre><code>        googleMap.setInfoWindowAdapter(new MyInfoWindowAdapter(addtext, selectedPath, latLng));
  </code></pre>