A Floating Action Button (FAB) is a prominent, circular button that hovers above the content, typically used for a primary action in an application.
If you want the fab to position relative to the layout and not on the bottom right corner, pass a Static option. If fab is Extended pass a text argument.
Here are the available methods for the Floating Action Button.
Examples ##
#Example - Basic FABclass Main extends App{onStart(){// Create a fullscreen linear layout with objects vertically centeredthis.main = ui.addLayout("main", "Linear", "VCenter,FillXY")// Add a floating action button to the main layout.// By default, FAB is positioned fix at the bottom right cornerthis.fab = ui.addFAB(this.main, "add")// Add a callback handler for onTouch event on the FABthis.fab.setOnTouch( this.onTouch )}onTouch(){ui.showPopup( "You click me!" )}}
Properties
The following properties are available on the FloatingActionButton object:
Methods
The following methods are available on the FloatingActionButton object: