Custom fab menu in Android studio

 Here I will show you how you can implement Custom fab menu in android app.


Add a Floating Action Button

A floating action button (FAB) is a circular button that triggers the primary action in your app's UI. This page shows you how to add the FAB to your layout, customize some of its appearance, and respond to button taps.

To learn more about how to design a floating action button into your app according to the Material Design Guidelines, also see Buttons: Floating Action Button. 



By default, the FAB is colored by the colorAccent attribute, which you can customize with the theme's color palette.

You can configure other FAB properties using either XML attributes or corresponding methods, such as the following:

  • The size of the FAB, using the app:fabSize attribute or the setSize() method.
  • The ripple color of the FAB, using the app:rippleColor attribute or the setRippleColor() method.
  • The FAB icon, using the android:src attribute or the setImageDrawable() method.

Floating Action Button(fab) displays the primary action in an application. It is a round icon button that’s elevated above other page content. Floating action buttons come in a default and mini size.

Floating action buttons provide quick access to important or common actions within an app. They have a variety of uses, including:

  • Performing a common action, such as starting a new email in a mail app.
  • Displaying additional related actions.
  • Update or transforming into other UI elements on the screen.

Floating action buttons adjust their position and visibility in response to other UI elements on the screen.

Sometime we need to create expandable floating Button. On click of floating button some other floating button should be open .

Source Code Below-


First of all guys create activity_main file. where we will use a constraint layout as parent layout and then inside it we will use Linear layout and make it orientation vertical.

Join Our channel member ship for source code

Then check community tab




Post a Comment

0 Comments