Compose Material 3 Adaptive
Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
---|---|---|---|---|
November 13, 2024 | 1.0.0 | - | - | 1.1.0-alpha07 |
Declaring dependencies
To add a dependency on compose, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle
file for
your app or module:
Groovy
dependencies { implementation "androidx.compose.material3.adaptive:adaptive:1.1.0-alpha07" implementation "androidx.compose.material3.adaptive:adaptive-layout:1.1.0-alpha07" implementation "androidx.compose.material3.adaptive:adaptive-navigation:1.1.0-alpha07" }
Kotlin
dependencies { implementation("androidx.compose.material3.adaptive:adaptive:1.1.0-alpha07") implementation "androidx.compose.material3.adaptive:adaptive-layout:1.1.0-alpha07" implementation "androidx.compose.material3.adaptive:adaptive-navigation:1.1.0-alpha07" }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
Compose Material3 Adaptive Version 1.1
Version 1.1.0-alpha07
November 13, 2024
androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha07
is released. Version 1.1.0-alpha07 contains these commits.
API Changes
- Remove drag handle implementation in the adaptive library and encourage people to use the M3 version of it. And at the same time introduce a modifier to provide pane expansion dragging ability to a provided drag handle composable. Also hide
DraggableState
as an implementation detail so we can change it later if needed. (Ib50cd) - Moves the entry point of pane motion customization from the scaffold functions to
AnimatedPane
according to UXR feedback. (I10f72) - Introduce fling support and custom animation spec for pane expansion. (Ie207d, b/362584341)
Bug Fixes
- Fix predictive back issues on cancellation. (36a3e0a), (b/369899645)
Version 1.1.0-alpha06
October 30, 2024
androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha06
is released. Version 1.1.0-alpha06 contains these commits.
API Changes
- Add
FloatRange
toPaneScaffoldTransitionScope.motionProgress
. (Iac0dd) - Change navigator params' type to generic types in navigable scaffolds. (I1da6e)
Version 1.1.0-alpha05
October 16, 2024
androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha05
is released. Version 1.1.0-alpha05 contains these commits.
API Changes
- Introduce animation specs class to ensure more consistent motion behavior and future expandability. (I2d3cc)
- Provide motion type and rename currentXXXXX in
PaneMotionData
to originXXXX. (I7c61a)
Version 1.1.0-alpha04
October 2, 2024
androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha04
is released. Version 1.1.0-alpha04 contains these commits.
New Features
- Added predictive back support to
NavigableListDetailPaneScaffold
andNavigableSupportingPaneScaffold
. (I4dc21, b/359616816)
API Changes
- Added
ThreePaneScaffoldState
toThreePaneScaffoldNavigator
. Navigation methods have been madesuspend
to support navigation with animation. AddedseekBack
to support partial navigation states (e.g. predictive back). (I5a651, b/359616816) - Added
MutableThreePaneScaffoldState
to control the transition between scaffold values. The existingThreePaneScaffoldState
has been made read-only. (Idb3c6) - Expose default pane motion implementations (I95a7b)
- Enable setting initial anchor of pane expansion state (Ie41b3, b/362350560)
Bug Fixes
- Enforce 48x48dp min touch target size of drag handle (7ce6635, b/366018217)
- Restore anchored position after configuration changes (3c9fc6b, b/362353672)
Version 1.1.0-alpha03
September 18, 2024
androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha03
is released. Version 1.1.0-alpha03 contains these commits.
Version 1.1.0-alpha02
September 4, 2024
androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha02
is released. Version 1.1.0-alpha02 contains these commits.
New Features
- Motion customization (I0bf9c), (I80e66) is supported for makers to change the default motions during adaptive scaffold state changes. Makers can choose from a set of default entering and exiting transitions, or implement pure custom transitions with the info provided through new motion scopes.
- Implement fading animation of pane expansion drag handles (46e3c69)
- Make remembered
PaneExpansionState
Saveable (61ff76f)
API Changes
- Add missing pane expansion APis to scaffolds (Ic5bc0)
ThreePaneScaffoldDestinationItem.content
renamed tocontentKey
.rememberListDetailPaneScaffoldNavigator
andrememberSupportingPaneScaffoldNavigator
default type argument changed fromNothing
toAny
. (I58749)- Mark
ThreePaneScaffoldState
as stable (I64aec) - Make drag handle parameters be scoped (Ic0aa2)
Version 1.1.0-alpha01
August 21, 2024
androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha01
is released. Version 1.1.0-alpha01 contains these commits.
New Features
- Introduce pane expansion support of adaptive scaffolds.
API Changes
- Introduce pane expansion APIs to public (I301d6)
- Introduced
ThreePaneScaffoldState
to control pane value transitions. Added overloads ofListDetailPaneScaffold
andSupportingPaneScaffold
which accept this state. (I5db3b) - Introduce pane expansion key and key provider interface (Id621f)
Bug Fixes
- Fix wrong partition calculation when excluded hinge presents. (9dfd483)
Compose Material3 Adaptive Version 1.0
Version 1.0.0
September 4, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0
is released. Version 1.0.0 contains these commits.
Major features of 1.0.0
- One-liner Composable functions
currentWindowSize()
,collectFoldingFeaturesAsState()
, andcurrentWindowAdaptiveInfo()
to get required window info to adapt apps, like window sizes and folding features. ListDetailPaneScaffold
andSupportingPaneScaffold
to provide two Material3 canonical layouts that will adapt themselves automatically according to different window configurations. Those two scaffolds are also fully customizable to suit makers’ different needs.ThreePaneScaffoldNavigator
and its relevant remember functions,rememberListDetailPaneScaffoldNavigator()
andrememberSupportingPaneScaffoldNavigator()
to provide navigation solutions within an adaptive scaffold, which can show multiple navigation destinations at the same time, comparing to the common one-destination-at-a-time setup in the non-adaptive world.- Default, built-in Material3 animations when changing adaptive scaffold states.
Version 1.0.0-rc01
August 21, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-rc01
is released. Version 1.0.0-rc01 contains these commits.
Bug Fixes
- Fix wrong partition calculation when excluded hinge presents. (9dfd483)
Version 1.0.0-beta04
June 26, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-beta04
is released. Version 1.0.0-beta04 contains these commits.
Bug Fixes
- Fixes the issue that when hinge bounds get updated, the layout is not updated accordingly. (71e9cf1)
Version 1.0.0-beta03
June 12, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-beta03
is released. Version 1.0.0-beta03 contains these commits.
Bug Fixes
- Fixes crashes caused by incorrect dependency resolution in beta02.
Version 1.0.0-beta02
May 29, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-beta02
is released. Version 1.0.0-beta02 contains these commits.
Version 1.0.0-beta01
May 14, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-beta01
is released. Version 1.0.0-beta01 contains these commits.
Version 1.0.0-alpha12
May 1, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-alpha12
is released. Version 1.0.0-alpha12 contains these commits.
API Changes
- Add
isFlat
info toHingeInfo
(Ie0516, b/333784198) - Make adaptive APIs non-experimental (I1d038)
- Make adaptive layout APIs non-experimental (Id23df)
- Changed
BackNavigationBehavior
from an enum to a value class (Id8757)
Bug Fixes
- Change transition fraction to a lambda (I6f5a9)
- Fix the initial state issue of
SizeTracker
(18326a9) - Include hinge list in
Posture
equality check (6687137)
Version 1.0.0-alpha11
April 17, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-alpha11
is released. Version 1.0.0-alpha11 contains these commits.
API Changes
- Make scope interfaces sealed. (Iefa57)
- Introduce
AnimatedPaneScope
. (I62d73, b/332750742) - Make
AdaptStrategy
sealed and stable. (Ia28b2) - Introduce a copy method of
PaneScaffoldDirective
. (I9291f) - Mark
ThreePaneScaffoldScope
as experimental. (I9d527) - Provide easy-to-use scaffold APIs that supports navigation. (I263f0, b/321010778)
Version 1.0.0-alpha10
April 3, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-alpha10
is released. Version 1.0.0-alpha10 contains these commits.
API Changes
- Make default preferred width adaptive and customizable. (Ic3abc)
- Rename scaffold directive calculation functions. (I10855)
- Remove paddings and insets from scaffold APIs. (I786f8)
- Add navigator remember methods without generic types. (I607c3)
Version 1.0.0-alpha09
March 20, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-alpha09
is released. Version 1.0.0-alpha09 contains these commits.
API Changes
- Add state transition fields to
ThreePaneScaffoldScope
. (I3d917) - Reorder scaffold parameters. (I4dff5)
- Provide default value of
AnimatedPane
modifier parameter. (I77dd7)
Bug Fixes
- Include spacer size into pane motions. (a3174ca)
Version 1.0.0-alpha08
March 6, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-alpha08
is released. Version 1.0.0-alpha08 contains these commits.
New Features
- Implement delayed sliding in when switching panes. (I1a38e)
API Changes
- Removed the
ThreePaneScaffoldState
interface. (I63f23)
Version 1.0.0-alpha07
February 21, 2024