title: How to custom marker InfoWindow in googleMap on android
body: <p>In my application I want to make custom marker <code>InfoWindow</code> and transparent background for this.<br>
  I wrote the code below but it shows me wrong background again. I want the transparent background, not white.<br></p>
  
  <p><strong>My code:</strong>  </p>
  
  <pre><code>       this.infoWindow = (ViewGroup) getLayoutInflater().inflate(R.layout.custominfowindow_one_button, null);
  
      this.infoButton = (Button) infoWindow.findViewById(R.id.button);
      this.infoButton_cancel=(Button) infoWindow.findViewById(R.id.btn_close_infowindow) ;
      mapWrapperLayout = (MapWrapperLayout) findViewById(R.id.map_relative_layout);
      mapWrapperLayout.init(mMap, getPixelsFromDp(this, 39 + 20));
      infoButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              infoWindowReady = !infoWindowReady;
          }
      });
  
      this.infoButtonListener = new OnInfoWindowElemTouchListener(infoButton, getResources().getDrawable(R.color.trans),
              getResources().getDrawable(R.color.trans),context) {
          @Override
          protected void onClickConfirmed(View v, Marker marker) {
  
          }
      };
  
      this.infoButton.setOnTouchListener(infoButtonListener);
      this.infoButton_cancelListener = new OnInfoWindowElemTouchListener(infoButton_cancel, getResources().getDrawable(R.drawable.ic_cancel3),
              getResources().getDrawable(R.drawable.ic_cancel3),context) {
          @Override
          protected void onClickConfirmed(View v, Marker marker) {
              addmarker_map.hideInfoWindow();
  
          }
      };
  
      this.infoButton_cancel.setOnTouchListener(infoButton_cancelListener );
  
      mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {
          @Override
          public View getInfoWindow(Marker marker) {
              return null;
          }
  
          @Override
          public View getInfoContents(Marker marker) {
  
              if (serviceName == "geocode" &amp;&amp; !hasGeoInfo) {
                  if (__counter == 1) {
                      infoButton.setText("نشانگر");
                      togglePopup();
                  } else if (__counter + "" == null) {
                      __counter = 0;
                      __counter++;
                  } else {
                      __counter++;
                  }
              }
              infoButtonListener.setMarker(marker);
              mapWrapperLayout.setMarkerWithInfoWindow(marker, infoWindow);
              return infoWindow;
          }
      });
  </code></pre>
  
  <p><strong>My XML codes:</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:background="@drawable/dfhdfthd"&gt;
  
      &lt;Button
          android:id="@+id/btn_close_infowindow"
          android:layout_width="@dimen/size25dp"
          android:layout_height="@dimen/size25dp"
          android:layout_marginLeft="@dimen/size70dp"
          android:background="@drawable/ic_cancel3"
          android:backgroundTint="#868585" /&gt;
  
  
      &lt;Button
          android:id="@+id/button"
          android:layout_width="@dimen/size100dp"
          android:layout_height="@dimen/size30dp"
          android:layout_below="@+id/btn_close_infowindow"
          android:layout_marginTop="-5dp"
          android:background="@color/trans" /&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>please see this image to understand what i mean : <a href="https://image.ibb.co/bsx7W5/photo_2017_09_21_12_44_22.jpg" rel="nofollow noreferrer">https://image.ibb.co/bsx7W5/photo_2017_09_21_12_44_22.jpg</a></p>
  
  <p>How can i make transparent background for infoWindows? Please help me.</p>