ExpandableWidgetHelper

public final class ExpandableWidgetHelper
extends Object

java.lang.Object
   ↳ com.google.android.material.expandable.ExpandableWidgetHelper


ExpandableWidgetHelper is a helper class for writing custom ExpandableWidgets and ExpandableTransformationWidget. Please see the interface documentation when implementing your custom class.

Summary

Public constructors

ExpandableWidgetHelper(ExpandableWidget widget)

Call this from the constructor.

Public methods

int getExpandedComponentIdHint()

Call this from ExpandableTransformationWidget.getExpandedComponentIdHint().

boolean isExpanded()

Call this from ExpandableWidget.isExpanded().

void onRestoreInstanceState(Bundle state)

Call this from View.onRestoreInstanceState(Parcelable).

Bundle onSaveInstanceState()

Call this from View.onSaveInstanceState().

boolean setExpanded(boolean expanded)

Call this from ExpandableWidget.setExpanded(boolean).

void setExpandedComponentIdHint(int expandedComponentIdHint)

Call this from ExpandableTransformationWidget.setExpandedComponentIdHint(int).

Inherited methods

Public constructors

ExpandableWidgetHelper

public ExpandableWidgetHelper (ExpandableWidget widget)

Call this from the constructor.

Parameters
widget ExpandableWidget

Public methods

getExpandedComponentIdHint

public int getExpandedComponentIdHint ()

Call this from ExpandableTransformationWidget.getExpandedComponentIdHint().

Returns
int

isExpanded

public boolean isExpanded ()

Call this from ExpandableWidget.isExpanded().

Returns
boolean

onRestoreInstanceState

public void onRestoreInstanceState (Bundle state)

Call this from View.onRestoreInstanceState(Parcelable).

Parameters
state Bundle

onSaveInstanceState

public Bundle onSaveInstanceState ()

Call this from View.onSaveInstanceState().

Returns
Bundle

setExpanded

public boolean setExpanded (boolean expanded)

Call this from ExpandableWidget.setExpanded(boolean).

Parameters
expanded boolean

Returns
boolean

setExpandedComponentIdHint

public void setExpandedComponentIdHint (int expandedComponentIdHint)

Call this from ExpandableTransformationWidget.setExpandedComponentIdHint(int).

Parameters
expandedComponentIdHint int