class Label : AppCompatTextView
A label of text attached to a view of the ExpandableFab widget.
Developer Notes:
Implementation Notes:
Since
1.0.0
<init> |
Used to create a Label programmatically. Clients should not need to call this directly as all labeled Views of the ExpandableFab widget already create their own labels which can be retrieved and modified (but not reassigned) as needed. Label(context: Context) |
hiddenToVisibleAnimationDurationMs |
The duration (in milliseconds as a positive long) of the animations that the Label will play when going from a hidden to visible state. var hiddenToVisibleAnimationDurationMs: Long |
labelBackgroundColor |
The color of the Label's background. Usage of this property is preferred over the inherited setBackgroundColor method. var labelBackgroundColor: Int |
labelElevation |
The elevation of the Label, in pixels as a positive float. Retrieve this value in the correct form from your dimens.xml file using: resources.getDimensionPixelSize(R.dimen.name_of_elevation_size). Usage of this property is preferred over the inherited set/getElevation methods. var labelElevation: Int |
labelText |
The text of the Label. Can be set to null to hide the label. Usage of this property is preferred over the inherited set/getText methods. var labelText: CharSequence? |
labelTextColor |
The color of the Label's text. Usage of this property is preferred over the inherited setTextColor method variations. var labelTextColor: Int |
labelTextSize |
The size of the Label's text, as a float. Retrieve this value in the correct form from your dimens.xml file using: resources.getDimension(R.dimen.name_of_text_size). Text sizes should use sp as the unit. Usage of this property is preferred over the inherited set/getTextSize methods. var labelTextSize: Float |
marginPx |
The margin (in pixels as a positive float) between the Label and the view it is attached to. Negative values are not allowed since clients should likely be changing the Label's position if they wanted to move the Label to the opposite side of the view it's attached to. var marginPx: Float |
overshootTension |
The tension (as a positive float) in an OvershootInterpolator applied on the Label when it is being shown from a hidden state. Larger values will exaggerate the effect more. var overshootTension: Float |
position |
The Label's LabelPosition, in relation to the view it's attached to. var position: LabelPosition |
translationXPx |
The distance (in pixels as a float) the Label will travel horizontally during animations. A negative value will make the Label travel to the left, while a positive value will make it travel to the right. See its use in visibleToHiddenAnimations and hiddenToVisibleAnimations. var translationXPx: Float |
visibleToHiddenAnimationDurationMs |
The duration (in milliseconds as a positive long) of the animations that the Label will play when going from a visible to hidden state. var visibleToHiddenAnimationDurationMs: Long |
onTouchEvent |
Scales the Label down when pressed, and back up when released. Gives the user some visual feedback to show that the Label was pressed. fun onTouchEvent(event: MotionEvent?): Boolean |