
我正在制作一个实现Google Maps V2地图的android应用.
当我实现包含布局标签时,
地图片段不会注册点击或屏幕上的任何类型的输入.
但是,当我删除include标签时,我可以在地图上四处移动.
我已经四处闲逛,但是找不到任何可以帮助的东西.
我也试过这个线程Google Maps V2 + Drawer Layout
但没有成功.
这是我的布局.
<FrameLayout androID:ID="@+ID/content_frame" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" > <fragment androID:ID="@+ID/map" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" /></FrameLayout><include layout="@layout/navigation_drawer" />帮助极大的赞赏.
谢谢
解决方法:
抽屉布局必须是布局文件中的根元素,如下所示:
<androID.support.v4.Widget.DrawerLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:tools="http://schemas.androID.com/tools" androID:ID="@+ID/drawer_layout" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" tools:context=".MainActivity"> <!-- Google map --> <fragment xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:ID="@+ID/map" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:name="com.Google.androID.gms.maps.MapFragment"/></androID.support.v4.Widget.DrawerLayout> 总结 以上是内存溢出为你收集整理的带有导航抽屉布局的Android Google地图全部内容,希望文章能够帮你解决带有导航抽屉布局的Android Google地图所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)