FabTransformationScrimBehavior
public
class
FabTransformationScrimBehavior
extends ExpandableTransformationBehavior
java.lang.Object | ||||
↳ | androidx.coordinatorlayout.widget.CoordinatorLayout.Behavior<android.view.View> | |||
↳ | com.google.android.material.transformation.ExpandableBehavior | |||
↳ | com.google.android.material.transformation.ExpandableTransformationBehavior | |||
↳ | com.google.android.material.transformation.FabTransformationScrimBehavior |
Behavior that should be attached to a scrim that should appear when a FloatingActionButton
is setExpanded(boolean)
expanded}.
Summary
Constants | |
---|---|
long |
COLLAPSE_DELAY
|
long |
COLLAPSE_DURATION
|
long |
EXPAND_DELAY
|
long |
EXPAND_DURATION
|
Public constructors | |
---|---|
FabTransformationScrimBehavior()
|
|
FabTransformationScrimBehavior(Context context, AttributeSet attrs)
|
Public methods | |
---|---|
boolean
|
layoutDependsOn(CoordinatorLayout parent, View child, View dependency)
|
boolean
|
onTouchEvent(CoordinatorLayout parent, View child, MotionEvent ev)
|
Protected methods | |
---|---|
AnimatorSet
|
onCreateExpandedStateChangeAnimation(View dependency, View child, boolean expanded, boolean isAnimating)
Creates an AnimatorSet to be played for this expanded state change. |
Inherited methods | |
---|---|
![]()
com.google.android.material.transformation.ExpandableTransformationBehavior
| |
![]()
com.google.android.material.transformation.ExpandableBehavior
| |
![]()
androidx.coordinatorlayout.widget.CoordinatorLayout.Behavior
| |
![]()
java.lang.Object
|
Constants
COLLAPSE_DELAY
long COLLAPSE_DELAY
Constant Value: 0 (0x0000000000000000)
COLLAPSE_DURATION
long COLLAPSE_DURATION
Constant Value: 150 (0x0000000000000096)
EXPAND_DELAY
long EXPAND_DELAY
Constant Value: 75 (0x000000000000004b)
EXPAND_DURATION
long EXPAND_DURATION
Constant Value: 150 (0x0000000000000096)
Public constructors
FabTransformationScrimBehavior
FabTransformationScrimBehavior ()
FabTransformationScrimBehavior
FabTransformationScrimBehavior (Context context, AttributeSet attrs)
Parameters | |
---|---|
context |
Context |
attrs |
AttributeSet |
Public methods
layoutDependsOn
boolean layoutDependsOn (CoordinatorLayout parent, View child, View dependency)
Parameters | |
---|---|
parent |
CoordinatorLayout |
child |
View |
dependency |
View |
Returns | |
---|---|
boolean |
onTouchEvent
boolean onTouchEvent (CoordinatorLayout parent, View child, MotionEvent ev)
Parameters | |
---|---|
parent |
CoordinatorLayout |
child |
View |
ev |
MotionEvent |
Returns | |
---|---|
boolean |
Protected methods
onCreateExpandedStateChangeAnimation
AnimatorSet onCreateExpandedStateChangeAnimation (View dependency, View child, boolean expanded, boolean isAnimating)
Creates an AnimatorSet to be played for this expanded state change.
If the new expanded
state is true, the dependency
should be hidden and the
child
should be shown.
If the new expanded
state is false, the dependency
should be shown and the
child
should be hidden.
Parameters | |
---|---|
dependency |
View : the ERROR(/ExpandableWidget) dependency containing the new expanded state. |
child |
View : the view that should react to the change in expanded state. |
expanded |
boolean : the new expanded state. |
isAnimating |
boolean : whether this state change occurred while a previous state change was still
|
Returns | |
---|---|
AnimatorSet |