Reputation: 1959
I have a SupportMapFragment that I show in a dialog. When the map type is set to satellite imagery, the roads are see-through and show the background activity (picture attached). This only seems to happen on my Pixel 6 Pro with Android 14 and not on my Pixel 4XL with Android 13. It also stops being a problem at a very zoomed in level. i.e. I can see the transparency come and go as I zoom. Any ideas on how to fix it? I tried to set a background on the FragmentContainerView but that didn't help. See code and screenshot below.
Layout code:
<androidx.fragment.app.FragmentContainerView
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@android:color/black"/>
Map code in onCreateDialog():
mapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map);
if (mapFragment == null) {
mapFragment = SupportMapFragment.newInstance();
getChildFragmentManager().beginTransaction().add(R.id.map, mapFragment).commit();
}
Screenshot:
Upvotes: 0
Views: 63