FabTransformationSheetBehavior

public class FabTransformationSheetBehavior
extends FabTransformationBehavior

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
           ↳ com.google.android.material.transformation.FabTransformationSheetBehavior


This class is deprecated.
Use MaterialContainerTransform instead.

Behavior that should be attached to any sheet that should appear when a FloatingActionButton is FloatingActionButton.setExpanded(boolean) expanded}.

A sheet usually has some width and height that's smaller than the screen, has an elevation, and may have a scrim underneath.

Summary

Public constructors

FabTransformationSheetBehavior()
FabTransformationSheetBehavior(Context context, AttributeSet attrs)

Protected methods

FabTransformationBehavior.FabTransformationSpec onCreateMotionSpec(Context context, boolean expanded)
boolean onExpandedStateChange(View dependency, View child, boolean expanded, boolean animated)

Reacts to a change in expanded state.

Inherited methods

Public constructors

FabTransformationSheetBehavior

public FabTransformationSheetBehavior ()

FabTransformationSheetBehavior

public FabTransformationSheetBehavior (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

Protected methods

onCreateMotionSpec

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

Parameters
context Context

expanded boolean

Returns
FabTransformationBehavior.FabTransformationSpec

onExpandedStateChange

protected boolean onExpandedStateChange (View dependency, 
                View child, 
                boolean expanded, 
                boolean animated)

Reacts to a change in expanded state. This callback is guaranteed to be called only once even if ExpandableWidget.setExpanded(boolean) is called multiple times with the same value. Upon configuration change, this callback is called with animated set to false.

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.

animated boolean: true if ExpandableWidget.setExpanded(boolean) was called, false if restoring from a configuration change.

Returns
boolean true if the Behavior changed the child view's size or position, false otherwise.