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 |
This class is deprecated.
Use MaterialContainerTransform
instead.
Behavior that should be attached to a scrim that should appear when a FloatingActionButton
is FloatingActionButton.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 | |
---|---|
Constants
COLLAPSE_DELAY
public static final long COLLAPSE_DELAY
Constant Value: 0 (0x0000000000000000)
COLLAPSE_DURATION
public static final long COLLAPSE_DURATION
Constant Value: 150 (0x0000000000000096)
EXPAND_DELAY
public static final long EXPAND_DELAY
Constant Value: 75 (0x000000000000004b)
EXPAND_DURATION
public static final long EXPAND_DURATION
Constant Value: 150 (0x0000000000000096)
Public constructors
FabTransformationScrimBehavior
public FabTransformationScrimBehavior ()
FabTransformationScrimBehavior
public FabTransformationScrimBehavior (Context context, AttributeSet attrs)
Parameters | |
---|---|
context |
Context |
attrs |
AttributeSet |
Public methods
layoutDependsOn
public boolean layoutDependsOn (CoordinatorLayout parent, View child, View dependency)
Parameters | |
---|---|
parent |
CoordinatorLayout |
child |
View |
dependency |
View |
Returns | |
---|---|
boolean |
onTouchEvent
public boolean onTouchEvent (CoordinatorLayout parent, View child, MotionEvent ev)
Parameters | |
---|---|
parent |
CoordinatorLayout |
child |
View |
ev |
MotionEvent |
Returns | |
---|---|
boolean |
Protected methods
onCreateExpandedStateChangeAnimation
protected 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 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 |