Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Google Map - Show Map Toolbar always on map load

enter image description here

Is it possible to show MapToolbar always on map load? Actually when I click on info window of marker, I am able to see the direction and map button. But I want these both buttons visibility by default on map load.

To enable map toolbar I am doing :

myMap.getUiSettings().setMapToolbarEnabled(true);    
like image 693
Ready Android Avatar asked Oct 18 '22 22:10

Ready Android


1 Answers

Your code is correct but this way you get effect after selection the marker by user. So, if you want to display google map toolbar automatically you should use lite mode of the map.

To make it add below code to your fragment xml. Should help.

xmlns:map="http://schemas.android.com/apk/res-auto"
map:liteMode="true"
like image 152
Rashed Zzaman Avatar answered Oct 21 '22 07:10

Rashed Zzaman