Display Google Maps in a dialog box

I have an activity that extends MapActivity. I want to show the map inside the dialogue in this action. that is, when I click the button, it displays a dialog with a map display, but this is because it throws this exception.

Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.

Please help me.

+1
source share
1 answer

You can create MapActivityand set its theme asDialog

+2
source

All Articles