Google android maps api v2 Show Marker Title Always

For displaying marker titles on the map around the markers, none of the solutions I found on internet worked for me so I rolled up my sleeves and made this library which solves this problem for me, hopefully it will help others too:

https://github.com/androidseb/android-google-maps-floating-marker-titles

Here is a preview of how it works:

preview


You can do this:

Marker marker = mMap.addMarker(new MarkerOptions().position(currentPosition).title("Your text"));
marker.showInfoWindow();

Something like that:

googleMap.addMarker(new MarkerOptions()
    .position(new LatLng(latitude, longitude))
    .title("Your position")).showInfoWindow();

Just call Marker.showInfoWindow();. See https://developers.google.com/maps/documentation/android/marker#info_windows and https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/Marker#showInfoWindow()