MapFragment gets a dark overlay when used in DialogActivity

前端 未结 5 1137
故里飘歌
故里飘歌 2020-12-24 08:39

I\'m trying to show a MapFragment of the Android Maps v2 API in an Activity with the @android:style/Theme.DeviceDefault.Light.Di

5条回答
  •  悲&欢浪女
    2020-12-24 08:59

    Depending on what your purpose is for the map in the dialog, if you don't need any of the map controls, you can use liteMode in which just an image of the map is displayed with whatever location you load. It doesn't have this z-layer overlay problem.

    You can add this to the MapView layout xml:

    map:liteMode="true"

    This worked for me, because I didn't want my map to be interactive anyway.

    You can read the Google docs here: https://developers.google.com/maps/documentation/android-api/lite

提交回复
热议问题