lightbulb_outline Please take our October 2018 developer survey. Start survey

FabTransformationSheetBehavior

public class FabTransformationSheetBehavior
extends FabTransformationBehavior

java.lang.Object
   ↳ android.support.design.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


Behavior that should be attached to any sheet that should appear when a FloatingActionButton is 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

From class com.google.android.material.transformation.FabTransformationBehavior
From class com.google.android.material.transformation.ExpandableTransformationBehavior
From class com.google.android.material.transformation.ExpandableBehavior
From class android.support.design.widget.CoordinatorLayout.Behavior
From class java.lang.Object

Public constructors

FabTransformationSheetBehavior

FabTransformationSheetBehavior ()

FabTransformationSheetBehavior

FabTransformationSheetBehavior (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

Protected methods

onCreateMotionSpec

FabTransformationBehavior.FabTransformationSpec onCreateMotionSpec (Context context, 
                boolean expanded)

Parameters
context Context

expanded boolean

Returns
FabTransformationBehavior.FabTransformationSpec

onExpandedStateChange

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 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 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.

animated boolean: true if ERROR(/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.