title: Custom info window for google maps marker in android
body: <p>I am working on a project which has google maps .I want to create a custom info window.So i created an xml file and did the following in the code:</p>
  
  <p>The xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"
      android:background="#00FF7F" &gt;
  
      &lt;TextView
          android:id="@+id/tv_lat"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textColor="#DC143C"
           /&gt;
  
      &lt;TextView
          android:id="@+id/tv_lng"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textColor="#DC143C"
           /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The main class:</p>
  
  <pre><code>package com.example.marinamapseg;
  
  import com.google.android.gms.maps.CameraUpdateFactory;
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.GoogleMap.InfoWindowAdapter;
  import com.google.android.gms.maps.SupportMapFragment;
  import com.google.android.gms.maps.model.LatLng;
  import com.google.android.gms.maps.model.Marker;
  import com.google.android.gms.maps.model.MarkerOptions;
  
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.support.v4.app.FragmentActivity;
  import android.view.Menu;
  import android.view.View;
  import android.widget.TextView;
  import android.widget.Toast;
  
  public class MainActivity extends FragmentActivity {
      // Google Map
      private GoogleMap googleMap;
      GPSTracker gps;
      double current_latitude,current_longitude;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          try {
              // Loading map
              initilizeMap();
  
          } catch (Exception e) {
              e.printStackTrace();
          }
          googleMap.setInfoWindowAdapter(new InfoWindowAdapter() {
  
              @Override
              public View getInfoWindow(Marker arg0) {
                  // TODO Auto-generated method stub
                  return null;
              }
  
              @Override
              public View getInfoContents(Marker arg0) {
                  View v = getLayoutInflater().inflate(R.layout.info_window_layout, null);
  
                  // Getting the position from the marker
                  LatLng latLng = arg0.getPosition();
  
                  // Getting reference to the TextView to set latitude
                  TextView tvLat = (TextView) v.findViewById(R.id.tv_lat);
  
                  // Getting reference to the TextView to set longitude
                  TextView tvLng = (TextView) v.findViewById(R.id.tv_lng);
  
                  // Setting the latitude
                  tvLat.setText("Latitude:" + latLng.latitude);
  
                  // Setting the longitude
                  tvLng.setText("Longitude:"+ latLng.longitude);
  
                  // Returning the view containing InfoWindow contents
                  return v;
              }
          });
  
      }
      private void initilizeMap() {
          if (googleMap == null) {
              googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
  
              // check if map is created successfully or not
              if (googleMap == null) {
                  Toast.makeText(getApplicationContext(),"Sorry! unable to create maps", Toast.LENGTH_SHORT).show();
              }
          }
          else
          {
              getcurrentlocation();
          }
      }
  public void getcurrentlocation()
  {
      gps=new GPSTracker(MainActivity.this);
      if(gps.canGetLocation())
      {
          current_latitude=gps.getLatitude();
          current_longitude=gps.getLongitude();
          //initialiseMap();
          placemarkersonmap();
      }
      else
      {
      gps.showSettingsAlert();
      }
  }
  public void placemarkersonmap()
  {
  
      googleMap.setMyLocationEnabled(true);
      googleMap.getUiSettings().setMyLocationButtonEnabled(true);
  
      LatLng latLng = new LatLng(current_latitude, current_longitude);
  
      googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 12f));
      googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 12f));
  
      MarkerOptions marker = new MarkerOptions().position(new LatLng(8.505439, 76.971293));
  
  
   googleMap.addMarker(marker);
  
  }
      @Override
      protected void onResume() {
          super.onResume();
          initilizeMap();
      }
  
  }
  </code></pre>
  
  <p>The problem is that when i click on the info window, the outer border of the info window is shown as white an within it my custom xml is shown.I have given fill parent in the xml file but still the white border is shown.How do i remove the white border?</p>