i'm trying to show text for all markers. I've seen this solution: http://googlemaps.github.io/android-maps-utils/ And checked the http://googlemaps.github.io/android-maps-utils/javadoc/
I've succeeded to get to this situation:
But as you can see the text is on the icon, and I want it to have a bit of margin button - and I can't figure out how to do it.
This is the code I used to make the marker:
Context context = getApplicationContext();
TextView text = new TextView(context);
text.setText(pilotName);
text.setTextSize(18);
text.setTypeface(null, Typeface.BOLD);
text.setTextColor(getResources().getColor(R.color.colorBlack));
IconGenerator generator = new IconGenerator(context);
generator.setContentPadding(20,20,0,0);
generator.setBackground(context.getDrawable(R.drawable.aircraft));
generator.setContentView(text);
Bitmap icon = generator.makeIcon();
MarkerOptions tp = new MarkerOptions().position(latLng).icon(BitmapDescriptorFactory.fromBitmap(icon));
mMap.addMarker(tp);
I've also tried: text.setPadding(40, 40, 0, 0);
And generator.setContentPadding(20,20,0,0);
to see if it solves it... and it didn't work
How can I solve it? Thanks