This repository has been archived by the owner on Dec 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expandable Floating Action Button
Ryan Bishop Mayobre edited this page Jun 24, 2020
·
1 revision
This button extends the FAB view object. Works like a normal FAB, but has text extended to the right of the icon. It also has the option of collapsing into a normal FAB with no text.
-
changeState(animate: Boolean = true)
- Changes the state of the FAB from collapsed to expanded, vice versa. Can be done witout animation iffalse
is passed in the parameters. -
setText(text: String)
- Set the text of the FAB. -
setTextColor(color: Int)
- Change the text color to color resource. -
setTextColor(color: ColorStateList)
- Change the text color to ColorStateList object. -
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.
-
app:text
- Set the text of the FAB. -
app:textColor
- Set the color of the text on the FAB. -
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.
Please report issues with the library or inaccurate information from the Wiki to issues.