Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Floating Action Button

Ryan Bishop Mayobre edited this page Jun 24, 2020 · 1 revision

Floating Action Button

The floating action button (FAB) acts as the base view for a few of the buttons in the MultiButton library. FABs can also be used as a simple button.

Kotlin Functions

  • setOnClickListener(listener: OnClickListener?) - Register a listener for click events.
  • setIcon(iconRes: Int): Boolean - Set a drawable resource as button icon. Returns true if successfully set an icon.
  • setIcon(iconDrawable: Drawable?): Boolean - Set a drawable object as the button's icon. Returns true if successfully set an icon.

XML Attributes

  • app:elevation_height - Takes in a dimension and sets the elevation level to the button.
  • app:icon - Takes in a references and applies it to the center of button.