如何将外部颜色设置为深色以突出显示扩展按钮。没有像“外部颜色”这样的属性。
这是我的FloatingActionMenu代码。

<com.getbase.floatingactionbutton.FloatingActionsMenu
    android:id="@+id/multiple_actions"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true"
    fab:fab_addButtonColorNormal="@color/white"
    fab:fab_addButtonColorPressed="@color/white_pressed"
    fab:fab_addButtonPlusIconColor="@color/half_black"
    fab:fab_labelStyle="@style/menu_labels_style"
    android:layout_marginBottom="16dp"
    android:layout_marginRight="16dp"
    android:layout_marginEnd="16dp"> // Main FloatingActionMenu which contain Two FloatinfActionButton.

    <com.getbase.floatingactionbutton.FloatingActionButton
        android:id="@+id/action_a"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        fab:fab_colorNormal="@color/white"
        fab:fab_title="Action A"
        fab:fab_colorPressed="@color/white_pressed"/>  // Appear when FloatingActionMenu is Pressed.

    <com.getbase.floatingactionbutton.FloatingActionButton
        android:id="@+id/action_b"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        fab:fab_colorNormal="@color/white"
        fab:fab_title="Button 2"
        fab:fab_colorPressed="@color/white_pressed"/>

最佳答案

像这样将视图添加到RelativeLayout中的布局

    <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">
<LinearLayout
            android:id="@+id/screen_overlay"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/white_overlay"
            android:clickable="true"
            android:orientation="vertical"
            android:visibility="gone" />
    </RelativeLayout>


并在onMenuExpanded和onMenuCollapsed上显示隐藏

@Override
    public void onMenuExpanded() {
        ScreenOverlay.setVisibility(View.VISIBLE);
    }

    @Override
    public void onMenuCollapsed() {
        ScreenOverlay.setVisibility(View.GONE);
    }


并在查看时折叠菜单

 @Override
    public boolean onTouch(View v, MotionEvent event) {
            FloatingActionsMenu.collapse();
        }
        return false;
    }

07-26 09:31