Clans / FloatingActionButton

Android Floating Action Button based on Material Design specification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FAM not displayed inside RelativeLayout

0xGeorgii opened this issue · comments

Hello team,

I tried to include relative layout with FAM

<Button
    android:layout_width="262dp"
    android:layout_height="45dp"
    android:backgroundTint="#6200ea"
    android:background="@drawable/item_background"
    style="?android:attr/borderlessButtonStyle"
    android:id="@+id/button"
    />
<com.github.clans.fab.FloatingActionMenu
    android:id="@+id/menu_down"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical|start"

    app:layout_anchorGravity="top|end"
    android:elevation="2dp"
    app:menu_labels_ellipsize="end"
    app:menu_labels_singleLine="true"
    app:menu_fab_size="mini"

    android:layout_marginStart="16dp"

    app:menu_showShadow="false"
    app:menu_openDirection="down"
    android:scaleX="1.2"
    android:scaleY="1.2"
    android:layout_alignBottom="@+id/button"
    android:layout_toEndOf="@+id/button">

</com.github.clans.fab.FloatingActionMenu>

into:

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:layout_marginTop="10dp"
    android:id="@+id/header_container">

    <include layout="@layout/activity_deck_layout_header"/>

</RelativeLayout>

<FrameLayout
    android:id="@+id/frameLayout"
    android:layout_width="match_parent"
    android:layout_height="222dp"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    android:layout_above="@+id/footer"
    android:layout_below="@+id/header_container">

    <include layout="@layout/card_list" />

and on preview, I can get in as I expect

image

but on an emulator I get

image

Does anybody have some thoughts or was experienced with the same issue? Thank you in advance.