Fab Option
The design and behavior of a single option within an ExpandableFab.
Developer Notes:
Layout_width and layout_height should be set to wrap_content, unless you're setting custom dimensions.
FabOptions must be defined within an ExpandableFabLayout to function properly.
label.labelText must be non-null for the optional label to show and other label properties to take effect.
Implementation Notes:
Since the Kotlin 'internal' modifier translates to 'public' in Java, the JvmSynthetic annotation is used on those functions and properties to hide them from the published API for Java clients. A proper solution to this issue would be a package-private visibility modifier, but Kotlin has yet to implement it (https://youtrack.jetbrains.com/issue/KT-29227). Until then, the JvmSynthetic annotations should remain in order to present the proper published API to both Java & Kotlin clients.
Since
1.0.0
Constructors
Used to create a FabOption programmatically (do not use the other constructor FabOption(context, attributeSet) - it is for use by the Android framework when inflating a FabOption via XML). This constructor keeps all optional properties of a FabOption at their default values, though you can always change these values after instantiation by using the appropriate setter methods (with the exception of orientation, which cannot be changed after instantiation).
Called by the system when creating a FabOption via XML (don't call this directly). To create a FabOption programmatically, use the FabOption(context, orientation) constructor.
Functions
Registers a callback to be invoked when this FabOption or its label is clicked. The default behavior the FabOption will be executed before this custom callback.
Sets the size of the FabOption. Overridden to ensure we never set the size to be FabSize.CUSTOM.
Properties
The tension (as a positive float) in an OvershootInterpolator applied on the FabOption when it's playing its animations for being shown from a hidden state (when the ExpandableFab is opening). The OvershootInterpolator allows us to have an animation where the FabOption will grow past its regular size when initially appearing, before smoothly shrinking down to regular size. Larger values will exaggerate the effort more. Default value is 3.5f.
The Orientation this FabOption is viewable in. Default value is Orientation.PORTRAIT.