custom_infowindow.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="110dp" android:layout_height="110dp" android:orientation="vertical" android:background="@drawable/heart" android:gravity="center" > <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" > <Button android:layout_width="40dp" android:layout_height="20dp" android:layout_alignParentTop="true" android:layout_marginLeft="60dp" android:layout_marginTop="15dp" android:text="Click!" android:textColor="#ffffff" android:textSize="10dp" android:background="#373737"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="HELLO" android:textColor="#FF0000" android:padding="10dp" android:layout_centerInParent="true" android:background="#00000000" /> </RelativeLayout> </LinearLayout>
this is your heart shape layout ... copy and paste it into the draping folder of your application ... lolz
Download
just inflate the above view in the custom info window ..!
mMap.setInfoWindowAdapter(new InfoWindowAdapter() { public View getInfoWindow(Marker arg0) { View v = getLayoutInflater().inflate(R.layout.custom_infowindow, null); return v; } public View getInfoContents(Marker arg0) {
This is just an image that I created. You can add an image better than me ... if it works let me know ... :)
Theflash
source share