mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
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
Material Components for Android
Material Components for Android (MDC-Android) help developers execute Material Design. Developed by a core team of engineers and UX designers at Google, these components enable a reliable development workflow to build beautiful and functional Android apps.
Material Components for Android are based on Android’s Design support library (DesignLib) which will continue to be released as part of Android’s SDK.
Useful Links
- All Components
- Contributing
- Class documentation (external site)
- MDC-Android on Stack Overflow (external site)
- Android Developer’s Guide (external site)
- Material.io (external site)
- Material Design Guidelines (external site)
Documentation
Description
Languages
Java
99.9%
Kotlin
0.1%