Google地图无法在浮动操作菜单中使用

时间:2018-04-14 05:41:18

标签: android google-maps

我将浮动操作菜单放在我的布局中,谷歌地图。地图显示在框架布局中浮动操作菜单工作正常但在地图中我无法执行任何操作,如地图自定义标记。标记不执行点击事件也没有任何事件在地图中执行。

这是我的xml代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 xmlns:fab="http://schemas.android.com/apk/res-auto"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:orientation="vertical">

<fragment
android:id="@+id/map_i"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<com.github.clans.fab.FloatingActionMenu
android:id="@+id/fab_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:paddingBottom="16dp"
android:paddingRight="16dp"
fab:menu_backgroundColor="#ccffffff"
fab:menu_fab_label="Choose an action"
fab:fab_colorNormal="#e0404b"
fab:fab_colorPressed="#e0404b"
fab:fab_colorRipple="#99FFFFFF"
fab:fab_showShadow="true"
fab:menu_labels_colorNormal="#333333"
fab:menu_labels_colorPressed="#444444"
fab:menu_labels_colorRipple="#66FFFFFF"
fab:menu_labels_showShadow="true"
fab:menu_labels_maxLines="-1"
fab:menu_labels_position="left"
fab:menu_openDirection="up"
fab:fab_shadowColor="#66000000"
fab:menu_labels_ellipsize="end"
fab:menu_labels_singleLine="true">
 <com.github.clans.fab.FloatingActionButton
    android:id="@+id/fab_email"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/fab_email"
    fab:fab_label="Edit an item" />

   <com.github.clans.fab.FloatingActionButton
    android:id="@+id/fab_whatsapp"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/fab_whatsapp"
    fab:fab_label="Edit an item"
    fab:fab_size="mini" />
  </com.github.clans.fab.FloatingActionMenu>
  </RelativeLayout>

0 个答案:

没有答案