0

I want to use multiple FloatingActionButton inside FloatingActionMenu. I want to add menu button left|bottom in screen and open up all buttons on screen when click.

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        xmlns:app="http://schemas.android.com/apk/res-auto">

        <com.github.clans.fab.FloatingActionMenu
            android:id="@+id/floatActionMenu"
            android:layout_gravity="left|bottom"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:layout_marginRight="10dp"
            android:layout_marginBottom="10dp"
            android:layout_marginLeft="10dp"
            fab:menu_icon="@drawable/ic_floor_image"
            fab:menu_colorNormal="#FFFFFF"
            fab:menu_labels_position="right">
            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/menu_item1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_floor_image"
                fab:fab_size="mini"
                fab:fab_label="Menu 1" />
            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/menu_item2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_floor_image"
                fab:fab_size="mini"
                fab:fab_label="Menu 2" />
            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/menu_item3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_floor_image"
                fab:fab_size="mini"
                fab:fab_label="Menu 3" />
            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/menu_item4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_floor_image"
                fab:fab_size="mini"
                fab:fab_label="Menu 4" />
                .
                .
                .
        </com.github.clans.fab.FloatingActionMenu>

    </FrameLayout>

I use Clans/FloatingActionButton library in my project. How can add an scroll for to show all button in screen when there are more than the number of buttons to fit on the screen? All buttons has also text label.

enter image description here

uyarc
  • 579
  • 4
  • 17
  • This won't answer how to do that but I think if need an scroll to shot your fabs, then fabs are not the way to go, those are the [recomendations](https://material.io/components/buttons-floating-action-button#types-of-transitions) – javdromero May 12 '21 at 14:02
  • @javdromero thanks. This is my application requirement. Using the FloatActionMenu will allow me to create a dynamic structure for me. Thank you for your suggestion. But I want to find a way to build a structure like this. I also edited my question. – uyarc May 15 '21 at 07:12

0 Answers0