Android, How to add Google map options from XML layout?
问题 I have a fragment that holds a MapView. I have added this view in XML file like this: <?xml version="1.0" encoding="utf-8"?> <com.google.android.gms.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" android:id="@+id/mapView" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" map:uiCompass="true" android:background="#00000000" /> And I've linked it to my code like this: