FabTransformationBehavior

public abstract class FabTransformationBehavior
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.FabTransformationBehavior


This class is deprecated.
Use MaterialContainerTransform instead.

Abstract base behavior for any non-scrim view that should appear when a FloatingActionButton is FloatingActionButton.setExpanded(boolean) expanded}.

Summary

Nested classes

class FabTransformationBehavior.FabTransformationSpec

Motion spec for a FAB transformation. 

Public constructors

FabTransformationBehavior()
FabTransformationBehavior(Context context, AttributeSet attrs)

Public methods

boolean layoutDependsOn(CoordinatorLayout parent, View child, View dependency)
void onAttachedToLayoutParams(CoordinatorLayout.LayoutParams lp)

Protected methods

AnimatorSet onCreateExpandedStateChangeAnimation(View dependency, View child, boolean expanded, boolean isAnimating)

Creates an AnimatorSet to be played for this expanded state change.

abstract FabTransformationBehavior.FabTransformationSpec onCreateMotionSpec(Context context, boolean expanded)

Inherited methods

Public constructors

FabTransformationBehavior

public FabTransformationBehavior ()

FabTransformationBehavior

public FabTransformationBehavior (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

onAttachedToLayoutParams

public void onAttachedToLayoutParams (CoordinatorLayout.LayoutParams lp)

Parameters
lp CoordinatorLayout.LayoutParams

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

onCreateMotionSpec

protected abstract FabTransformationBehavior.FabTransformationSpec onCreateMotionSpec (Context context, 
                boolean expanded)

Parameters
context Context

expanded boolean

Returns
FabTransformationBehavior.FabTransformationSpec