FabTransformationBehavior

public abstract class FabTransformationBehavior
extends ExpandableTransformationBehavior

java.lang.Object
   ↳
     ↳ com.google.android.material.transformation.ExpandableBehavior
       ↳ com.google.android.material.transformation.ExpandableTransformationBehavior
         ↳ com.google.android.material.transformation.FabTransformationBehavior
Known Direct Subclasses


Abstract base behavior for any non-scrim view that should appear when a FloatingActionButton is 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

From class com.google.android.material.transformation.ExpandableTransformationBehavior
From class com.google.android.material.transformation.ExpandableBehavior
From class java.lang.Object

Public constructors

FabTransformationBehavior

FabTransformationBehavior ()

FabTransformationBehavior

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

onAttachedToLayoutParams

void onAttachedToLayoutParams (CoordinatorLayout.LayoutParams lp)

Parameters
lp CoordinatorLayout.LayoutParams

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

onCreateMotionSpec

FabTransformationBehavior.FabTransformationSpec onCreateMotionSpec (Context context, 
                boolean expanded)

Parameters
context Context

expanded boolean

Returns
FabTransformationBehavior.FabTransformationSpec