Removes onSaveInstanceState() and onRestoreInstanceState() from the ExpandableWidget interface. Those methods required all descendent subclass Views to declare those methods to be public, which is not ideal given how many FAB subclasses there are.
Those interface methods were mostly used for their javadoc, which is now moved into the interface javadoc.
PiperOrigin-RevId: 163440160
This broke clients that subclassed ExpandableFloatingActionButton and overrode onSaveInstanceState(). Because those subclasses declared the methods as protected, it conflicts with this commit which makes them public.
Will roll-forward with client fixes.
PiperOrigin-RevId: 162844548
Separate ExpandableBehavior and ExpandableTransformationBehavior.
ExpandableWidget - for widgets that have expanded state, like BackLayerLayout:
{g,s}etExpanded()
on{Save,Restore}InstanceState()
ExpandableBehavior - for behaviors that want to react to expanded state change, like BackLayerSiblingBehavior:
onLayoutChild() // Layouts the content, and animates the content to a new expanded position when BLL's expanded children change size.
onExpandedStateChange() // Animates the content position when expanded state changes.
ExpandableTransformationWidget - for widgets that transform during expansion, like FAB:
{g,s}etExpandedComponentIdHint()
Will also include these in the future:
getBackgroundDrawable() // Shape drawable includes color, bounds, shape, elevation
getForegroundDrawable()
etc
ExpandableTransformationBehavior - for behaviors that want to react to expanded state change by transforming, like FabTransformationSheetBehavior:
onCreateExpandedStateChangeAnimation() // Animates the FAB and sheet when expanded state changes.
PiperOrigin-RevId: 162809090
After this CL, FAB is able to keep an `expanded` state. When the state changes,
it dispatches an event to dependent Behaviors.
This change does not include any XML attributes.
PiperOrigin-RevId: 161757314