2024-09-05
Activity: v1.9.2
September 4, 2024
androidx.activity:activity:1.9.2, androidx.activity:activity-compose:1.9.2, and androidx.activity:activity-ktx:1.9.2 are released. Version 1.9.2 contains these lthcocommits.
Bug Fixes
- Fixed an issue where the Activity Compose
PredictiveBackHandlerAPI would continue to handle the system back gesture on the frame it was disabled, which could result in libraries like Navigation Compose to handle back even with an empty back stack, resulting in it throwing anIndexOutOfBoundsException. (Ie3301, b/340202286)
Activity: v1.10.0-alpha02
September 4, 2024
androidx.activity:activity:1.10.0-alpha02, androidx.activity:activity-compose:1.10.0-alpha02, and androidx.activity:activity-ktx:1.10.0-alpha02 are released. Version 1.10.0-alpha02 contains these commits.
Behavior Changes
- The
PickVisualMediaandPickMultipleVisualMediaActivity Result contracts that trigger the Photo Picker no longer directly delegates to Google Play services if the system Photo picker is not available, but uses the publicACTION_SYSTEM_FALLBACK_PICK_IMAGESaction and related extras to provide a consistent Photo Picker experience to OEMs and system apps as a fallback. This should have no effect on the user experience for devices that have a recent version of Google Play services. (I3513d)
Bug Fixes
- Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. (I9496c, b/345472586)
- From Activity
1.9.2: Fixed an issue where the Activity ComposePredictiveBackHandlerAPI would continue to handle the system back gesture on the frame it was disabled, which could result in libraries like Navigation Compose to handle back even with an empty back stack, resulting in it throwing anIndexOutOfBoundsException. (Ie3301, b/340202286) - From Activity
1.9.1: Fixed an issue withPredictiveBackHandlerwhere after doing system back, attempting to doonBackPressedfrom theOnBackPressedDispatcherwould fail. (I5f1f8)
Annotation: v1.9.0-alpha03
September 4, 2024
androidx.annotation:annotation-*:1.9.0-alpha03 is released. Version 1.9.0-alpha03 contains no changes since the previous alpha.
AppSearch: v1.1.0-alpha05
September 4, 2024
androidx.appsearch:appsearch-*:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits.
API Changes
- Deprecates unnecessary
setEmbeddingSearchEnabledandgetEmbeddingSearchEnabled. DeletessetListFilterTokenizeFunctionEnabledandgetListFilterTokenizeFunctionEnabled. Deleted the 'tokenize' query function. Replaced withgetSearchStringParameterquery function andaddSearchStringParameterfunction. (I09f5a) - Rename
Alarm#getComputingDevicetogetOriginatingDevice. (I63121)
Camera: v1.5.0-alpha01
September 4, 2024
androidx.camera:camera-*:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.
API Changes
- Provide API to set composition settings for dual concurrent camera video capture. The settings include alpha value for blending, offset in x, y coordinates, scale of the width and height of camera frame display window. The offset, width and height are specified in normalized device coordinates. (Ia2b8a)
- Exposed
CameraProvider.getCameraInfoto be a formal API. (I901cd) - Added API
PendingRecording.withAudioEnabled(boolean initialMuted)to control the initial mute state. (I635c3, b/354829267)
Bug Fixes
- Fixed the crash when
bindToLifecycleis invoked with a destroyedLifecycleOwner. (I6e6d8) - Fixed Preview is black screen in front camera while binding with
VideoCaptureon Motorola Edge 20 Fusion. (I1fe88) - Optimized the configuration for detecting zoom gestures in
PreviewViewto improve smoothness. (I04ffc)
AndroidX releases:
Collection: v1.5.0-alpha01
September 4, 2024
androidx.collection:collection-*:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.
API Changes
OrderedScatterSetis a new ordered, allocation-free collection (Ic4178)SieveCacheis a new allocation-free replacement forLruCachethat offers better hit ratio characteristics. (I50a17)- Exposed the
packedValueinternal representation forIntIntPairandFloatFloatPair. (Ifeb75, b/331853566) - Adding access to the content array in list collections. (I899d5, b/333903173)
- Add
DoubleList, a List-like data structure optimized for Double values. (Ia10d1, b/315127635)
Bug Fixes
- Collections library is moving to target Kotlin 1.9 (I0782f)
- Optimize many of the collections to be more efficient. (Ic0566)
Compose Animation: v1.7.0
September 4, 2024
androidx.compose.animation:animation-*:1.7.0 is released.
Important changes since 1.6.0
Important changes in version 1.7.0 are covered in this blogpost.
New Shared Element Transition APIs
- New shared element transition APIs await your usage and feedback. These new experimental APIs enable tagging layouts as shared across layout tree using the provided modifiers, producing smoothly changing bounds when one set of shared content exits and the other set enters. (Icb0b9)
- New
scaleInSharedContentToBoundsandscaleOutSharedContentToBoundsto scale content insharedBounds(I731c1) - Experimental
SharedTransitionScopeis now an interface rather than a class. (Iaf856) - New
resizeModes(ScaleToBoundsandRemeasureToBounds) forsharedBoundsto choose between scaling and remeasure. The previousscaleIn/OutSharedContentToBoundsAPIs are now deprecated. (I0d41a)
Improvements to existing APIs:
- New
Modifier.animateContentSizethat takes an additional parameter for custom content alignment. (I5623a, b/269803907) - New Experimental
DeferredTargetAnimationfor animating size, position, or any other target that is unknown during instantiation. (I60745) SeekableTransitionStatereplacessnapTo()withseekTo(), and adds asnapTo()that immediately changes the state to a destination state without any kind of animation.- You may now pass a
periodicBiasvalue (Float) tokeyframesWithSpline, this will make it so that the initial and final velocity of the spline are equal. Useful for repeatable animations using splines. The bias indicates how much each velocity (initial and final) gets modified to achieve periodicity. (Ic1e6c, b/292114811)
The following APIs have become stable or been removed:
AnimatedVisibilityScope.transitionis now a stable API.Modifier.animateEnterExit(..)has also been made stable. (I6c1d1)ApproachLayoutModifierNodeandModifier.approachLayoutare now stable, with newisMeasurementApproachInProgress()andisPlacementApproachInProgress()to replace the oldisMeasurementApproachComplete()andisPlacementApproachComplete()respectively.- Removed deprecated
intermediateLayoutmodifier. (I3e91c) LookaheadScopeAPIs have been made stable. (I21507)
Compose Animation: v1.8.0-alpha01
September 4, 2024
androidx.compose.animation:animation-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.
New Features
- New
Modifier.animateBoundsAPI for animating size and position changes within a lookahead scope. 94b9394
API Changes
- Remove experimental flags on Keyframes with Arcs and Splines (89e1199)
Bug Fixes
- Skip
placeHolderSizelogic when no match is found (77c0160) - Clamp play time in
AndroidFlingSplineto prevent crashes due to non-monotonically increasing play time(9d47587)
External Contribution
- Prevent setting seekable transition
playTimewhen no transition is running by Steven Schoen. (c2e6e7e6) - Fix
SharedTransitionScopenot drawing items in certain conditions by Steven Schoen (b41077b6)
Compose Foundation: v1.7.0
September 4, 2024
androidx.compose.foundation:foundation-*:1.7.0 is released. Version 1.7.0 contains these commits.
Important changes since 1.6.0
- Performance of
Modifier.clickable,Modifier.focusable,Modifier.indication,Modifier.scrollableandModifier.draggablehas been significantly improved. As a part of this effort, the following API changes were made in addition to internal changes- Added a new Indication API,
IndicationNodeFactory. This leads to more performant Indication implementations compared to the previous (now deprecated)rememberUpdatedInstanceAPI. For migration information, see developer.android.com. clickable/combinedClickable/selectable/toggleablenow accepts a nullableMutableInteractionSourceparameter. If null, and the provided Indication is anIndicationNodeFactory, the Indication can be lazily created only when needed, which improves performance. If you are not hoisting and using theMutableInteractionSource, it is recommended to pass null instead of passingremember { MutableInteractionSource() }.Indication#rememberUpdatedInstancehas been deprecated. It has a high unavoidable performance penalty, and prevents other optimizations. Instead, you should use the newIndicationNodeFactoryAPI.
- Added a new Indication API,
BasicTextFieldusing aTextFieldStateis now stable and we advise all call-sites to begin migration fromBasicTextField(value, onValueChange)toBasicTextField(TextFieldState).- The
ClickableTexthas been deprecated. To add clickable links to your text, useBasicTextwith the newLinkAnnotationannotation in yourAnnotatedString.LinkAnnotationallows for custom styling based on link state (e.g. focused, hovered). - Introducing
ContextualFlowRowandEnhanced FlowRow/ColumnwithMaxLinesandOverflow. We are excited to announce enhancements to the experimentalFlowRowandFlowColumn, now featuringmaxLinesand overflow support, alongside the debut ofContextualFlowRowandContextualFlowColumn. This update is designed to provide performance optimal components, whereContextualFlow*is perfect for a large number of items making use of a small maxLines config and dynamic +N see more buttons, andFlowRowandFlowColumnis perfect for a small number of items, less than 100 items. Important: To maintain existing behavior inFlowRoworFlowColumnwhere all items are composed regardless of if they fit the cross axis max, set overflow toFlowRowOverflow.VisibleorFlowColumnOverflow.Visibleduring initialization. ExploreContextualFlowRowSampleandFlowRowSamplefor examples of these new features in action. (Ib9135, b/293577082) - Item appearance and disappearance animation support was added into
LazyColumnandLazyRow. Previously it was possible to addModifier.animateItemPlacement()modifier in order to support placement (reordering) animations. We deprecated this modifier and introduced a new non-experimental modifier calledModifier.animateItem()which allows you to support all three animation types: appearance (fade in), disappearance (fade out) and reordering. (I2d7f7, b/150812265) - Implemented experimental support for long screenshots in Compose scroll containers using the official Android API (
ScrollCaptureCallback). NestedScrollsources Drag and Fling are being replaced byUserInputandSideEffectto accommodate for the extended definition of these sources that now include animations (Side Effect) and Mouse Wheel and Keyboard (UserInput).LazyLayoutprefetch requests can be marked as urgent now, meaning that we expect this item to be needed in the next frame and want to ignore frame budget to make sure to do more work in advance (Id513f)- Support stylus handwriting feature on devices after Android U. (I002e4)
- Various APIs have been promoted to stable
- Pagers, snapping, window insets
Compose Foundation: v1.8.0-alpha01
September 4, 2024
androidx.compose.foundation:foundation-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.
Compose Material: v1.7.0
September 4, 2024
androidx.compose.material:material-*:1.7.0 is released. Version 1.7.0 contains these commits.
Important changes since 1.6.0
- Material components have been migrated to use the new ripple APIs, and no longer query
RippleTheme. - Material components that previously accepted a
MutableInteractionSourceand defaulted toremember { MutableInteractionSource() }now accept a nullableMutableInteractionSourceand default to null instead. If you are not hoisting and using theMutableInteractionSource, you should pass null. This allows for some components to lazily create an instance only when needed, improving performance. It is also recommended that you make similar changes in your own components. BottomDrawer,ModalBottomSheet,BackdropScaffoldand standard Bottomsheet have been promoted to stable API.
Compose Material: v1.8.0-alpha01
September 4, 2024
androidx.compose.material:material-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.
API Changes
- Added new
NavGraphBuilder.bottomSheetbuilder to create a bottomSheet with safe args (I28589, I777db, b/351858980))
Compose Material3: v1.3.0
September 4, 2024
androidx.compose.material3:material3-*:1.3.0 is released. Version 1.3.0 contains these commits.
Important changes since 1.2.0
Major features of 1.3.0
New Material Design 3 components
- Carousel
HorizontalMultiBrowseCarouselandHorizontalUncontainedCarouselEnhancements to existing Material Design 3 components.
- [
ModalBottomSheet] now supports Predictive Back on U+ (Iccf32, b/281967264, b/304850357) - [
SearchBar] now supports Predictive Back on U+ (I657f8) - Nav Drawer (
ModalDrawerSheetandDismissibleDrawerSheet) now supports Predictive Back on U+ as opt-in (Ie5b0b) DropdownMenunow supports custom color, shape, elevation, and border. (I8e981,b/289554448, b/301887035, b/283654243)- Updated Slider to improve accessibility by adding a gap and stop indicator. (I3058e)
- Updated
ProgressIndicatorto improve accessibility by adding a gap and stop indicator. (I21451) - Added a default caret for rich tooltip, support custom caret to be drawn given anchor
LayoutCoordinates. (Ifd42c) Breaking Changes - New pull-to-refresh APIs:
- Simplified
PullToRefreshStateto use fractional values instead of Dp units. isRefreshingstate is controlled by the user instead ofPullToRefreshState.- Separated out the nested scroll connection from
PullToRefreshState. It is handled by the newPullToRefreshBoxorModifier.pullToRefresh. - This update is a breaking change to previous experimental APIs. (I0adeb, b/314496282, b/317177684, b/323787138, b/324573502, b/317177683) Visual Breaking Changes
- Simplified
- Update focus state overlay to be 0.1f to ensure sufficient color contrast. (I7ea77)
- Small adjustments to surface and background color defaults in
lightColorSchemeanddarkColorScheme. (I9db52) - Updated Slider and
ProgressIndicatorcolors to follow the new Non-Text Contrast specs. (I26807) SurfaceContainervariants are now used by components. Components which formally calculated color withSurfaceandTonalElevationnow useSurfaceContainerroles by default, which are not affected by tonal elevation. (b/304584161)- Surface and Surface container baseline roles have been slightly adjusted, providing more tint in light and dark themes. (I677a5)
- Promoted experimental APIs to stable!
- Performance improvements
Compose Material3 Adaptive: v1.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. ListDetailPaneScaffoldandSupportingPaneScaffoldto 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.ThreePaneScaffoldNavigatorand 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.
Compose Material3 Adaptive: v1.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
PaneExpansionStateSaveable (61ff76f)
API Changes
- Add missing pane expansion APis to scaffolds (Ic5bc0)
ThreePaneScaffoldDestinationItem.contentrenamed tocontentKey.rememberListDetailPaneScaffoldNavigatorandrememberSupportingPaneScaffoldNavigatordefault type argument changed fromNothingtoAny. (I58749)- Mark
ThreePaneScaffoldStateas stable (I64aec) - Make drag handle parameters be scoped (Ic0aa2)
Compose Runtime: v1.7.0
September 4, 2024
androidx.compose.runtime:runtime-*:1.7.0 is released. Version 1.7.0 contains these commits.
Important changes since 1.6.0
- Added the ability to provide a composition local that is computed based on the values of other composition locals either by default, using
compositionLocalWithComputedDefault()or by supplying a lambda to use to compute the value by usingprovidesComputedinstead ofprovides. - The value of a composition local can be obtained by using the
currentValueproperty of the composition local accessible from within the lambda computing the value. This is used instead ofcurrentwhich is only accessible in@Composablefunctions. (Iadbc0) - Newly created state objects are immediately accessible from other snapshots, including the global snapshot, with their initial state. Any subsequent modifications are not visible until the snapshot in which the object was created is applied.
- The initial state of
mutableStateOf(), as well as their primitive versions, is the value passed in as a parameter tomutableStateOf(). The initial state ofmutableStateListOf()andmutableStateMapOf()is empty. - Added
Snapshot.isInSnapshotandSnapshot.PreexistingSnapshotIdthat are used to enable a state object to support being immediately accessible from the global snapshot upon its creation. - Custom state objects can support being immediately accessible by following the pattern of changes made to the built-in snapshot objects. (I84a17)
- Enable
nonSkippingGroupOptimizationfor compose libraries. This causes the generated code for all non-restartable composable functions in androidx to be more efficient. In the future we plan to enable this by default. I(acbc08) - Invalidate composable lambdas in subcompositions on the same frame. (98301c)
- Call
onReleasecallback in the same order asonForgotten. (2cd790) - Enable strong skipping mode (ed1766)
- Make
currentCompoundHashKeyunique in more cases (d4a872)
Compose Runtime: v1.8.0-alpha01
September 4, 2024
androidx.compose.runtime:runtime-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.
Compose UI: v1.7.0
September 4, 2024
androidx.compose.ui:ui-*:1.7.0 is released.
Important changes since 1.6.0
Important changes in version 1.7.0 are covered in this blogpost.
Compose UI: v1.8.0-alpha01
September 4, 2024
androidx.compose.ui:ui-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.
Constraintlayout: v2.2.0-beta01
September 4, 2024
androidx.constraintlayout:constraintlayout:2.2.0-beta01 is released. Version 2.2.0-beta01 contains these commits.
ConstraintLayout-compose, and ConstraintLayout-Core 1.1: v1.1.0-beta01
September 4, 2024
androidx.constraintlayout:constraintlayout-compose:1.1.0-beta01, androidx.constraintlayout:constraintlayout-compose-android:1.1.0-beta01, and androidx.constraintlayout:constraintlayout-core:1.1.0-beta01 are released. Version 1.1.0-beta01 contains these commits.
Core Splashscreen: v1.2.0-alpha02
September 4, 2024
androidx.core:core-splashscreen:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.
Bug Fixes
- Add
isLightThemeattribute to themes ofSplashScreen(I01000, b/238522114) - Get splashscreen icon by
AppCompatResources(Ib05e, b/289242141, b/263972037) - Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. (Ieb9ae, b/345472586)
credentials: v1.5.0-alpha05
September 4, 2024
androidx.credentials:credentials:1.5.0-alpha05 and androidx.credentials:credentials-play-services-auth:1.5.0-alpha05 are released. Version 1.5.0-alpha05 contains these commits.
API Changes
- Support a new credential type -
DigitalCredential(I12952) - Expose bundle conversion APIs: expose more
asBundleandfromBundlehelpers to allow these classes be passed across IPC more easily (I1a017) - Make
PendingIntentHandlerbackward compatible. (I34c13) - Make
CallingAppInfobackward compatible (I65085) - Expose
ClearCredentialRequestTypesconstants.
Emoji2: v1.5.0
September 4, 2024
androidx.emoji2:emoji2-*:1.5.0 is released. Version 1.5.0 contains these commits.
Important changes since 1.4.0
- Support emoji 15.1 and bidirectional emoji selector UI. A simple click on the bidirectional switcher allows users to toggle between left- and right-facing versions of emojis.
- Support multi-skintone emoji selector. Long-pressing couple emojis reveals a multi-person emoji selector for the zero state. When the user taps on the left half of an emoji, the emoji preview on the bottom right will be updated accordingly. When the user selects both halves of an emoji, the emoji preview on the bottom right will show the entire emoji and the user can then input it.
Fragment: v1.8.3
September 4, 2024
androidx.fragment:fragment-*:1.8.3 is released. Version 1.8.3 contains these commits.
Bug Fixes
FragmentManagernow correctly takes into account pending operations when handling the Predictive Back gesture. This should ensure that doing a system back no longer causes anIndexOutOfBoundsException. (I9ba32, b/342316801)AndroidFragmentno longer crashes if it is added to composition while the containing activity/fragment's state is already saved. (I985e9, b/356643968)
Graphics Core: v1.0.1
September 4, 2024
androidx.graphics:graphics-core:1.0.1 is released. Version 1.0.1 contains these commits.
Bug Fixes
- Fixed issue where memory resources would occasionally not be released.
Health Connect: v1.1.0-alpha08
September 4, 2024
androidx.health.connect:connect-client:1.1.0-alpha08, androidx.health.connect:connect-client-external-protobuf:1.1.0-alpha08, and androidx.health.connect:connect-client-proto:1.1.0-alpha08 are released. Version 1.1.0-alpha08 contains these commits.
API Changes
- Set default value for features variable in
HealthConnectClient. (I788dc) - Add an API to check feature availability. (Iedd43)
Bug Fixes
- Return
SDK_UNAVAILABLEinHealthConnectClient.getSdkStatus()whenHealthConnectManageris null in U+ 5802f - Add
toStringoverrides toRecordClassesaa5dc - Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. (If6b4c, b/345472586)
Health Connect Testing: v1.0.0-alpha01
September 4, 2024
androidx.health.connect:connect-testing:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.
New Features
The Health Connect Testing library simplifies the creation of automated tests. You can use this library to verify the behavior of your application and validate that it responds correctly to uncommon cases, which are hard to test manually.
You can use the library to create local unit tests, which typically verify the behavior of the classes in your app that interact with the Health Connect client.
The entry point to the library is the FakeHealthConnectClient class, which you use in tests to replace the HealthConnectClient. It has the following features:
- An in-memory representation of records, so you can insert, remove, delete and read them
- Generation of change tokens and change tracking
- Pagination for records and changes
- Aggregation responses are supported with stubs
- Allows any function to throw exceptions
- A
FakePermissionControllerthat can be used to emulate permissions checks
API Changes
Lifecycle: v2.8.5
September 4, 2024
androidx.lifecycle:lifecycle-*:2.8.5 is released. Version 2.8.5 contains these commits.
Bug Fixes
- Update the
androidx.lifecycle.ReportFragmentProGuard rules to allow obfuscation . (ff898e1)
External Contribution
SavedStateHandle.saveableextension delegate now supports nullable values. Thanks Roman Kalukiewicz for the contribution. (0d78ea6)
Lifecycle: v2.9.0-alpha02
September 4, 2024
androidx.lifecycle:lifecycle-*:2.9.0-alpha02 is released. Version 2.9.0-alpha02 contains these commits.
Bug Fixes
- From Lifecycle
2.8.5: Update theandroidx.lifecycle.ReportFragmentProGuard rules to allow obfuscation . (ff898e1)
External Contribution
- Move
androidx.compose.ui.platform.LocalLifecycleOwnerto common source set (KMP). Thanks Ivan Matkov from JetBrains for the contribution. (8cd5d03) - From Lifecycle
2.8.5: SavedStateHandle.saveable` extension delegate now supports nullable values. Thanks Roman Kalukiewicz for the contribution. (0d78ea6)
lint: v1.0.0-alpha02
September 4, 2024
androidx.lint:lint-gradle:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
New Features
- Added a check for discouraged
GradleRunner.withPluginClasspathAPI. - Added checks for APIs that are problematic for lazy configuration by flagging calls to
TaskContainer.withTypewithout callingconfigureEach.- Added checks for APIs that are problematic for Gradle Project Isotation by flagging calls to
Project.getRootProject,Project.findProject,Project.getParent,Project.findProperty,Project.getProperties,Project.hasProperty,Project.property.
- Added checks for APIs that are problematic for Gradle Project Isotation by flagging calls to
Navigation: v2.8.0
September 4, 2024
androidx.navigation:navigation-*:2.8.0 is released. Version 2.8.0 contains these commits.
Important changes since 2.7.0
Navigation Kotlin DSL Type-Safety
- Navigation now provides type-safety for the Kotlin DSL (used by Navigation Compose) using Kotlin Serialization to allow you to define destinations in your navigation graph via type safe objects and data classes:
// Define a home destination that doesn't take any arguments @Serializable object Home// Define a profile destination that takes an ID @Serializable data class Profile(val id: String) // Now define your NavHost using type safe objects NavHost(navController, startDestination = Home) { composable<Home> { HomeScreen(onNavigateToProfile = { id -> navController.navigate(Profile(id)) }) } composable<Profile> { backStackEntry -> val profile: Profile = backStackEntry.toRoute() ProfileScreen(profile) } }
See the Navigation Compose meet Type Safety blog post for more information.
Navigation Compose Predictive Back
- Navigation Compose now provides support for Predictive in-app back via the new
SeekableTransitionStateAPIs from compose-animation. This allows you to use the back gesture to see the previous destination with your custom Transition before deciding to either commit the transaction via the completed gesture or cancel.
Navigation Fragment Composable
- Added a new
navigation-fragment-composeartifact that includes aComposableNavHostFragmentalternative toNavHostFragmentthat allows you to add composable destinations to your Navigation XML files. Eachcomposabledestination must be expressed as a top-level, no argument@Composablemethod whose fully qualified name is used as theandroid:nameattribute on each destination. When navigating to one of these destinations, a containing fragment is created to display the composable content.
// In HomeScreen.kt @Composable fun HomeScreen() { // Your Composable content here }
// In your navigation.xml
<composable
android:id="@+id/home_screen"
android:name="com.example.HomeScreenKt$HomeScreen" />
Other Changes
- Navigation Compose now depends on Compose 1.7.0.
- Navigation now provides a new
CollectionNavType<T>class, a subclass ofNavType<T>for collection-based arguments such as list, arrays, maps. All of the defaultNavTypearrays (IntArrayType,LongArrayType,FloatArrayType,BoolArrayType, andStringArrayType) now inherit from this new class. NavTypenow has built-in support for Lists of Int, String, Boolean, Float, and Long.
pdf: v1.0.0-alpha02
September 4, 2024
androidx.pdf:pdf-viewer:1.0.0-alpha02 and androidx.pdf:pdf-viewer-fragment:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.
Bug Fixes
- The blurry PDF image issue when rotating from portrait to landscape and the app going to sleep has been resolved.
- The find in file menu now maintains the result count even when the configuration changes.
- The
FloatingActionButtonicon is now available for single-page PDFs. - Overlapping issues between the Find in file bar and the
FloatingActionButtonhave been fixed. - Text and highlight annotations can now be rendered in the viewer.
- Accessibility improvements have been made to the Find in file bar.
- UI fixes have been implemented for rotation, including preserving the find count, addressing the disappearing text selection menu, and resolving the FAB overlapping issue.
- The find in file menu hiding behind the keyboard in landscape mode has been fixed.
Known Issues
- 3D images in PDF documents are not rendered in the viewer.
PdfViewerFragmenthas some performance issues on very large PDF documents (> 250 MB)
ProfileInstaller: v1.4.0-rc01
September 4, 2024
androidx.profileinstaller:profileinstaller:1.4.0-rc01 is released with no changes from the last beta release. Version 1.4.0-rc01 contains these commits.
Startup: v1.2.0-rc01
September 4, 2024
androidx.startup:startup-runtime:1.2.0-rc01 is released with no changes from the last beta release. Version 1.2.0-rc01 contains these commits.
Wear Compose: v1.5.0-alpha01
September 4, 2024
androidx.wear.compose:compose-*:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.
API Changes
- We have added a new
LazyColumninto the Wear Compose Foundation library with associatedLazyColumnStateandLazyColumnScopeAPIs. This serves as the foundation for building customisable scaling and morphing effects with Wear Compose. (Ib3b22) - We have added an indexed version of
itemsIndexedintoLazyColumnScopeas part of the newLazyColumnAPI. (Ib4a57) - We have added
LazyColumnmodifiers in order to support scaling and morphing behaviors. (Ie229a) HierarchicalFocusCoordinatorhas been promoted to stable. (I31035)- We have added support for letter spacing to curved text. (I3c740)
- Added a
rotationLockedparameter toCurvedLayout.curvedComposableto stop components being rotated. (I66898) - The temporary
LocalUseFallbackRippleImplementationAPI from wear material and wear material3 has been removed (I62282) - Removed
WearDevices.SQUAREfrom the@WearPreviewDevicesmulti-preview (I11c02)
Bug Fixes
SwipeToRevealnow positions the revealed items on the visible portion of the screen, this helps whenSwipeToRevealis used within a list, so the items are always interactable and never fall outside the screen. (I38929)SwipeToRevealnow resets thelastActionTypeto None whenanimatedTohas completed. (I59b03)- Improved the documentation for the new
rotationLockedparameter oncurvedComposable. (Ifbd57) - Fixed a crash when passing
NaNintoScalingLazyColumnSnapFlingBehavior’sperformFling. (Ic13da) - Fixed bug on curved layout size modifier (I0fedf)
- We have added support for letter spacing specified in 'sp'. (I9f6e3)
- We have fixed a bug in Material2 Dialog where the
onDismissRequestcallback was not being called when the dialog became invisible (I64656) - Renamed
LayoutCoordinates.introducesFrameOfReferencetoLayoutCoordinates.introducesMotionFrameOfReferenceto better reflect its purpose. Renamed related function to calculate coordinates based on that flag. (I3a330)
Wear Compose Material3: v1.0.0-alpha24
September 4, 2024
androidx.wear.compose:compose-material3:1.0.0-alpha24 is released. Version 1.0.0-alpha24 contains these commits.
API Changes
- We have added a Motion scheme into the Material3 theme. This will be used by components across the library to apply animation specifications such as springs for expressive motion. (I54ff3)
- We have added
AppScaffoldandScreenScaffoldcomponents to the Material3 library, which include functionality to coordinate layering and transitions ofTimeTextandScrollIndicator.AppScaffoldprovides a top level of scaffold components that sit on top of all screens. As such, addingTimeTextto theAppScaffoldallows it to remain in place while swiping between screens. Screens can themselves override or hide the time text.ScreenScaffoldprovides a slot for theScrollIndicatorand automatically animates the scroll indicator when scrolling, including timeout to hide the scroll indicator after inactivity. (I047d6) - We have added
ScrollIndicatorfeaturing the new Material3 design. It has a fixed thumb size based on initial list contents, in order to avoid size variations when lazy content is loaded into the list. (Ic228d) - We have changed the
ScrollAwayAPI such thatScreenStageis a value class instead of an enum class, to allow for additional stages to be added as needed going forwards. (I48c93) - We have added
EdgeButton, a distinctive Wear-specific button with a shape that follows the curvature of the bottom of the screen (I16369) - We have added a new slot to the
ScreenScaffoldfor a bottom button (such asEdgeButton), that will be shown and resized depending on the scrolling content (I032eb) - We have added
Modifier.scrollTransformandModifier.targetMorphingHeightto add Material3 motion effects to items inLazyColumn. (Ie229a) - We have added
SegmentedCircularProgressIndicatoras a variation onCircularProgressIndicator. The segmented variation either shows a single progress value across all segments or shows each segment as being on/off. (I6e059) - We have added
LinearProgressIndicatoras an alternative to the existingCircularProgressIndicator. (I89182) - We have added
AlertDialog, providing layouts for presenting important prompts to the user. Variations are included for either a pair of confirm/dismiss buttons or a single bottom button (typically an EdgeButton) below a stack of options. Both variations have slots for icon, title and additional text to provide further details. (Ieb873) - We have added
OpenOnPhoneDialog, which should be used to indicate an action that will continue on the user's phone.OpenOnPhoneDialogis dismissed after a specified timeout. (I978fd) - We have added
Confirmation, a dialog component that has slots for an icon and either curved or linear text. Specific variations are provided for success/failure messages. Confirmations are automatically dismissed after a timeout. (Ib43e8) - We have added a background to
TimeTextto mitigate issues where the underlying content and theTimeTextoverlapped, and obscured the time. (Ia11fd) - We have added
LevelIndicator, which shows the value of a setting such as volume, and can be used with the existingSteppercomponent to construct a volume screen.LevelIndicatoris similar toScrollIndicator, but is displayed on the opposite side of the screen and has a wider stroke width and different indicator color by default. (I8a4ac) - We have added
TimePicker, with layouts for 24 hour time (with or without seconds), or 12 hour time with am/pm selection. (Ia5124) - We have added
DatePicker, with configuration for column ordering (i.e. day-month-year, month-day-year or year-month-day) and optional min/max dates. (Ibf13b) - We have added a weight parameter to the
TimeText'stextfunction. In cases where TimeText is made up of more than one text element, this allows control over how the space is distributed. (I36700) - We have added
RadioButtonandSplitRadioButton- these components simplify the previous API by combining both the (Split)SelectableButtonand the child radio control (If7ae8) - We have added
CheckboxButtonandSplitCheckboxButton- these components simplify the previous API by combining both the (Split)ToggleButtonand the child Checkbox control (Ia8f70) - We have added
SwitchButtonandSplitSwitchButton- these components simplify the previous API by combining both the(Split)ToggleButtonand the child Switch control (I0d349) - We have updated
AnimatedTextdocumentation to explain overshooting behavior. (Iff30a) - We have added
ButtonGroupto combine 2 or 3 buttons such that button presses produce a coordinated animation. (Ie27db) - We have added optional shape animation for
IconButtonandTextButtonwhen pressed. (Iffca5) - We have added an additional color variation,
FilledVariant, toButton,IconButton,TextButton,CompactButtonandEdgeButton(I65fc3) - We have added the
forcedSizeparameter toImageWithScrimPainter, such that Button image backgrounds now maintain their component size by default. Setting theforcedSize = nulladopts thePainter.instrinsicSizeinstead. (Ic57af) - We have added long-click to Buttons (Ib613d)
- Long click support has also been added to
IconButtonandTextButton. (I38891) - Long click support has been added to Cards. (I305d5)
- We have added
LocalTextMaxLines,LocalTextAlign,LocalTextOverflowasCompositionLocalsand used them as parameter defaults onText. The composition locals can now be used by components such asCheckboxButton,SwitchButton,RadioButtonto implement UX guidance, but the parameters can be overridden by developers if necessary. (Iab841) - We have added
Placeholderto help in masking the content of components like buttons & cards until the data is loaded. (I1a532) - We have added
IconToggleButtonColorsandTextToggleButtonColorsto replace the now removedToggleButtonColors. (Ie0bf1)
Bug Fixes
- We have updated
Button,FilledTonalButton,OutlinedButton,ChildButton,CompactButtonto use the newCompositionLocalsLocalTextMaxLines,LocalTextAlign,LocalTextOverflowto implement UX guidance - these parameters can be overridden by developers on Text directly if necessary (Ie51f7) - We have changed the default stroke width of the
LevelIndicatorto6dpto differentiate it from theScrollIndicatorwhich has a stroke width of4dp. (If6f63) - We have fixed an issue in
TimeTextso that larger sweep angles are supported. (Ie489f) - Fixed an issue during
EdgeButtonrecomposition. (I4cdca) - Corrected layouts of split toggle buttons when customized content padding is provided. (Ia33d3)
- Rounded up small progress values to at least the line width of the progress indicator. (I3bd84)
Wear Compose: v1.4.0
September 4, 2024
androidx.wear.compose:compose-*:1.4.0 is released. Version 1.4.0 contains these commits.
Important changes since 1.3.0
ScalingLazyColumnandPickernow support rotary input by default - it is recommended to remove explicit rotary handling and defer to the default system behavior. If necessary, use therotaryScrollableBehaviorparameter to configure either scroll or snap behavior - for snap behavior, it is recommended to provide snap behavior and touch scrolling capabilities using theflingBehaviorparameter.Modifier.rotaryScrollableis a new modifier that connects rotary events with scrollable containers, allowing users to scroll using a crown or a rotating bezel on their Wear OS device.SwipeDismissableNavHostnow provides an entry animation for in-app transitions.PositionIndicatoris now shown by default when a screen is first displayed.
Additional changes
- For a more complete set of the changes introduced in version 1.3.0, see the beta01 release notes.
Webkit: v1.12.0-rc01
September 4, 2024
androidx.webkit:webkit:1.12.0-rc01 is released. This release contains no changes from the 1.12.0-beta01 release.
WindowManager: v1.4.0-alpha02
September 4, 2024
androidx.window:window-*:1.4.0-alpha02 is released. Version 1.4.0-alpha02 contains these commits.
New Features
Add support for custom WindowSizeClass.
- Open the constructor for
WindowSizeClassso devs can use their own. - Add
isAtLeastutility methods so that developers can process a range ofWindowSizeClassvalues. - Add an extension function on
Set<WindowSizeClass>to compute the best match from the Set. - Add constants for the Android recommended breakpoints.
- Add the breakpoint set corresponding to the Android recommended breakpoints.
API Changes
- Update bounds method names for
WindowSizeClass. (If89a6) - Update the
WindowSizeClassAPI to support adding new breakpoint values in the future. Instead of having absolute bounds we use the lower bounds and recommend devs use lower bound checks when processing aWindowSizeClass. The existingWindowWidthSizeClassandWindowHeightSizeClasswill be deprecated as they will not be developed further. (I014ce)
WorkManager: v2.10.0-alpha03
September 4, 2024
androidx.work:work-*:2.10.0-alpha03 is released. Version 2.10.0-alpha03 contains these commits.
New Features
- Added trace tags to Jobs from
WorkManagerwhich makes ‘adb shell dumpsys jobscheduler’ a lot simpler to understand since it will contain the name of the Worker being executed. Trace sections are also added around key areas ofWorkManager.
API Changes
- WorkManager 2.10.0 is now compiled with SDK 35.
- Fix foreground workers of type ‘short service’ and ‘data sync’ timing out and causing an ANR when
WorkManagerdidn’t callstopSelf(). This fix only applies to devices with API 34 and 35 where foreground service types were introduced. (ca06b2, b/364508145) - New
WorkerParametersAPIs that make it possible to switch the remote process that theWorkerbinds to when using aWorkerFactory. (Ibdc8a, Ie8a90, I7373f)
Bug Fixes
- Fix a crash caused by
WorkManagerattempting to restart a long-running worker (i.e. a foreground worker) when the foreground type of the work had Android 14 prerequisite permissions that were revoked. (b/333957914) - Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. (Ia60e0, b/345472586)