There is a FloatActionMenu with buttons. How to collapse FloatActionMenu when opening an Activity ?

 <com.github.clans.fab.FloatingActionMenu android:id="@+id/fabMain" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" android:layout_gravity="bottom|right" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginBottom="10dp"> <com.github.clans.fab.FloatingActionButton android:id="@+id/fab1" style="@style/MenuButtonsStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic1" app:fab_label="@string/text1" fab:fab_label="@string/text1" fab:fab_size="mini"/> <com.github.clans.fab.FloatingActionButton android:id="@+id/fab2" style="@style/MenuButtonsStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic2" app:fab_label="@string/text2" fab:fab_label="@string/text2" fab:fab_size="mini"/> </com.github.clans.fab.FloatingActionMenu> 
  • What have you tried? Maybe it is worth at least to look at source codes of the library specified by you github.com/Clans/FloatingActionButton/blob/master/library/src/… ? By the way, there are public methods public void toggle(boolean animate) , public void open(final boolean animate) and public void close(final boolean animate) - Vasil Baymurzin
  • helped thank you - Natalia Sergeevna

0