显示在对话框谷歌地图 [英] Showing google maps on a dialog

查看:178
本文介绍了显示在对话框谷歌地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有延伸MapActivity的活动。
我想显示地图在这个活动里面的对话。
即当我点击一个按钮,它会显示一个图形页面的对话,但这种崩溃,因为它是howing此异常

I have an activity that extends MapActivity. I want to show map inside a dialog in this activity. i.e when I click a button it will show a dialog with a mapview, but this crashes because it is howing this exception

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

请帮我。

推荐答案

您可以创建一个 MapActivity 并设置它的主题像对话框

You can create a MapActivity and set its theme like Dialog

这篇关于显示在对话框谷歌地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆