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
FabTransformationSheetBehavior This class is deprecated. Use MaterialContainerTransform instead.  


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

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

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

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

Reacts to a change in expanded state.

ExpandableWidget findExpandableWidget(CoordinatorLayout parent, View child)
static <T extends ExpandableBehavior> T from(View view, Class<T> klass)

A utility function to get the ExpandableBehavior attached to the view.

abstract boolean layoutDependsOn(CoordinatorLayout parent, View child, View dependency)
boolean onDependentViewChanged(CoordinatorLayout parent, View child, View dependency)
abstract boolean onExpandedStateChange(View dependency, View child, boolean expanded, boolean animated)

Reacts to a change in expanded state.

boolean onLayoutChild(CoordinatorLayout parent, View child, int layoutDirection)
boolean blocksInteractionBelow(CoordinatorLayout arg0, View arg1)
boolean getInsetDodgeRect(CoordinatorLayout arg0, View arg1, Rect arg2)
int getScrimColor(CoordinatorLayout arg0, View arg1)
float getScrimOpacity(CoordinatorLayout arg0, View arg1)
static Object getTag(View arg0)
boolean layoutDependsOn(CoordinatorLayout arg0, View arg1, View arg2)
WindowInsetsCompat onApplyWindowInsets(CoordinatorLayout arg0, View arg1, WindowInsetsCompat arg2)
void onAttachedToLayoutParams(CoordinatorLayout.LayoutParams arg0)
boolean onDependentViewChanged(CoordinatorLayout arg0, View arg1, View arg2)
void onDependentViewRemoved(CoordinatorLayout arg0, View arg1, View arg2)
void onDetachedFromLayoutParams()
boolean onInterceptTouchEvent(CoordinatorLayout arg0, View arg1, MotionEvent arg2)
boolean onLayoutChild(CoordinatorLayout arg0, View arg1, int arg2)
boolean onMeasureChild(CoordinatorLayout arg0, View arg1, int arg2, int arg3, int arg4, int arg5)
boolean onNestedFling(CoordinatorLayout arg0, View arg1, View arg2, float arg3, float arg4, boolean arg5)
boolean onNestedPreFling(CoordinatorLayout arg0, View arg1, View arg2, float arg3, float arg4)
void onNestedPreScroll(CoordinatorLayout arg0, View arg1, View arg2, int arg3, int arg4, int[] arg5, int arg6)
void onNestedPreScroll(CoordinatorLayout arg0, View arg1, View arg2, int arg3, int arg4, int[] arg5)
void onNestedScroll(CoordinatorLayout arg0, View arg1, View arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
void onNestedScroll(CoordinatorLayout arg0, View arg1, View arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int[] arg8)
void onNestedScroll(CoordinatorLayout arg0, View arg1, View arg2, int arg3, int arg4, int arg5, int arg6)
void onNestedScrollAccepted(CoordinatorLayout arg0, View arg1, View arg2, View arg3, int arg4, int arg5)
void onNestedScrollAccepted(CoordinatorLayout arg0, View arg1, View arg2, View arg3, int arg4)
boolean onRequestChildRectangleOnScreen(CoordinatorLayout arg0, View arg1, Rect arg2, boolean arg3)
void onRestoreInstanceState(CoordinatorLayout arg0, View arg1, Parcelable arg2)
Parcelable onSaveInstanceState(CoordinatorLayout arg0, View arg1)
boolean onStartNestedScroll(CoordinatorLayout arg0, View arg1, View arg2, View arg3, int arg4, int arg5)
boolean onStartNestedScroll(CoordinatorLayout arg0, View arg1, View arg2, View arg3, int arg4)
void onStopNestedScroll(CoordinatorLayout arg0, View arg1, View arg2, int arg3)
void onStopNestedScroll(CoordinatorLayout arg0, View arg1, View arg2)
boolean onTouchEvent(CoordinatorLayout arg0, View arg1, MotionEvent arg2)
static void setTag(View arg0, Object arg1)
Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()

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