FloatingActionButton - Color, Size, Radius, Position & Icons.

ㅤFloating Action Buttonㅤ

With the ability to customize the background color, size, corner radius and position on the screen (Arrangement), add icons from the assets and generate multiple action buttons related to the main one.

20241102_033428 20241102_033734



ㅤFunctionsㅤ

CreateFloatingActionButton

Creates a customizable floating action button.

  • arrangement: where the button will be added.
  • backgroundColor: Color of the button accepts colors in hexadecimal or int.
  • sizeInPixels: Size of the button (int).
  • leftMargin, topMargin, rightMargin, bottomMargin: Margins of the button (integers).
  • cornerRadius: Corner radius of the button (floating).
  • corner: Corner where the button will be positioned ("top_left", "top_right", "bottom_left", "bottom_right").

SetFabIconFromAssets

  • iconName: Name of the icon to load from assets..

RemoveFloatingActionButton


GenerateFloatingActionButtons

Generates multiple floating action buttons with configurable colors and icons

  • numberOfButtons: Number of buttons to generate (int).
  • separation: Spacing between generated buttons (int).
  • colors: List of colors for generated buttons, accepts hexadecimal or int colors.
  • icons: List of icons for buttons.
  • direction: Direction in which buttons will be positioned: "top", "bottom", "left", "right".

ㅤEventsㅤ

FloatingActionButtonClicked

Fired when the floating action button is clicked.


GeneratedButtonClicked

Fired when one of the generated buttons is clicked.

  • index: Index of the generated button that was clicked.
  • icon: Icon of the generated button that was clicked.

ㅤExtension:ㅤ
joejsanz.joedevfloatingactionbutton.aix (14.0 KB)


Thanks.


ㅤAndroid Material Design Libraryㅤ

10 Likes

Yet another useful extension!

Nico

2 Likes

Once more an awesome extension :ok_hand:
Keep it up :clap::clap::clap:

1 Like

Very good extension. Thanks a lot for your contribution.

2 Likes

. Thanks a lot @nico , @JEWEL & @husnain .

2 Likes