2024-03-19
Activity: v1.9.0-beta01
March 20, 2024
androidx.activity:activity:1.9.0-beta01, androidx.activity:activity-compose:1.9.0-beta01, and androidx.activity:activity-ktx:1.9.0-beta01 are released. Version 1.9.0-beta01 contains these commits.
Bug Fixes
- Fixed an Activity startup performance regression introduced in Activity
1.9.0-alpha02caused by calling theOnBackPressedDispatcheras part of the creation of the Activity. (Ie75e3)
Annotation: v1.8.0-alpha02
March 20, 2024
androidx.annotation:annotation-*:1.8.0-alpha02 is released with no notable changes. Version 1.8.0-alpha02 contains these commits.
Benchmark: v1.3.0-alpha02
March 20, 2024
androidx.benchmark:benchmark-*:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits.
New Features
Experimental R8 support in microbench via embedded proguard rules. Note that this support is experimental, and requires AGP 8.3 for minification of library module tests. Use the following to enable R8 minification/optimization in your benchmark module's
build.gradle, which should lead to a significant performance increase, depending on workload. (I738a3, b/184378053)android { buildTypes.release.androidTest.enableMinification = true }
Bug Fixes
- Fixes method tracing warning to be on separate line from microbench output. (I0455c, b/328308833)
Compose Animation: v1.6.4
March 20, 2024
androidx.compose.animation:animation-*:1.6.4 is released. Version 1.6.4 contains these commits.
Compose Animation: v1.7.0-alpha05
March 20, 2024
androidx.compose.animation:animation-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits.
API Changes
SeekableTransitionStatereplacessnapTo()withseekTo(), and adds asnapTo()that immediately changes the state to a destination state without any kind of animation.
Compose Compiler: v1.5.11
March 20, 2024
androidx.compose.compiler:compiler:1.5.11 and androidx.compose.compiler:compiler-hosted:1.5.11 are released. Version 1.5.11 contains these commits.
Notes
Starting with this version, the compiler will now call
startReplaceGroupinstead ofstartReplacableGroupwhen a module is compiled with a runtime that contains this method.startReplaceGroupwas introduced in the runtime in Compose Runtime1.7.0-alpha03. Calls tostartRestartGroupare only generated when targeting 1.7.0-alpha03 or later versions of the runtime.Calling
startReplaceGroupinstead ofstartReplaceableGroupallows the runtime to detect changes more efficiently but may affect the order in which changes are detected by theComposerand sent to theApplier. This may result in subtle changes in behavior if anApplierrelies on the order these operations are detected.
Bug Fixes
- Fix nested external generic types being inferred Unstable. (I3437f, b/327643787)
- Support multiple stability configuration files. (I8db14, b/325326744)
- Compose Compiler now correctly transforms overridden functions by recursively walking through base classes/overrides. (I2c9f9, b/316196500)
- Ensure that function reference memoization doesn't try to capture implicit parents of local declarations when they are not used directly. (Ib1267)
- Fix code generation for composable crossinline lambda (hard to encounter this bug without "nonSkippingGroupOptimization" enabled). (Icb2fd, b/325502738)
Compose Foundation: v1.6.4
March 20, 2024
androidx.compose.foundation:foundation-*:1.6.4 is released. Version 1.6.4 contains these commits.
Bug Fixes
- A long-press-then-drag selection gesture which moves out of the text’s layout bounds in the first frame of the drag no longer crashes. (Icdf90, b/325307463)
Compose Foundation: v1.7.0-alpha05
March 20, 2024
androidx.compose.foundation:foundation-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits.
API Changes
- Removed experimental
LocalTextLinkStylecomposition local for styling hyperlinks. (Iebfa7) - Removed experimental override of
BasicTextwithonLinkClickedargument. A replacement API for hyperlinks support will follow in the future. (I107d5) - Removed Codepoints related methods and properties under
TextFieldStateandTextFieldBuffer. Also removed theinCharssuffixes from the remaining selection and composition related APIs. (Ief7ce) AnchoredDraggable'scurrentValuewill now update when passing through an anchor point. UsesettledValueto receive the previouscurrentValuesemantics, only updating when settling at an anchor. The progress is now exposed as a function (requiring a starting and end point) instead of a property. (Ibe6e8, b/318707189, b/298271489, b/294991954)BasicTextField(state),TextFieldState,InputTransformation,OutputTransformation,TextFieldLineLimits,TextFieldDecoratorare graduated to stable. (I9582b)- Introduced
InterceptPlatformTextInputfor helping write low-level IME-related tests and other low-level IME use cases.PlatformTextInputTestOverridehas been deprecated. (I862ed, b/322680547) - Split
restrictedConstraints()to two methods:fitPrioritizingWidth()andfitPrioritizingHeight()(I6d7fd)
External Contribution
- Added 2 new API
isLastScrollForward/isLastScrollBackwardto check scroll direction for latest scroll action, return false if no scroll action yet. (I63a0e)
Compose Material: v1.6.4
March 20, 2024
androidx.compose.material:material-*:1.6.4 is released. Version 1.6.4 contains these commits.
Compose Material: v1.7.0-alpha05
March 20, 2024
androidx.compose.material:material-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits.
API Changes
- The
ScaffoldSubcomposeInMeasureFixflag has been removed. (I67363)
Compose Material3: v1.3.0-alpha03
March 20, 2024
androidx.compose.material3:material3-*:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits.
Visual Breaking Changes
- 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)
New Features
- Added parameters to customize
ExposedDropdownMenu. In particular, menus now have afocusableparameter (defaulttrue) that should be set tofalsewhen working with editable text fields. (I4184c, b/323694447, b/278609042)
API Changes
- The
ScaffoldSubcomposeInMeasureFixflag has been removed. (Ie2a4b) NavigationRailItemColorsis now marked as@Immutable. (If6112, b/327660613)NavigationBarItemColorsis now marked as@Immutable. (I42a30, b/298064514)- Reorder params in Slider Track composable. (I9f315)
ExposedDropdownMenuis now implemented usingPopup. The behavior should be the same except focusable menus with editable text fields may be dismissed when typing on the keyboard.
Bug Fixes
- Surface and Surface container baseline roles have been slightly adjusted, providing more tint in light and dark themes. (I677a5)
- Updated Slider and
ProgressIndicatorcolors to follow the new Non-Text Contrast specs. (I26807) - 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)
Compose Material3 Adaptive: v1.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
AnimatedPanemodifier parameter. (I77dd7)
Bug Fixes
- Include spacer size into pane motions. (a3174ca)
Compose Runtime: v1.6.4
March 20, 2024
androidx.compose.runtime:runtime-*:1.6.4 is released. Version 1.6.4 contains these commits.
Compose Runtime: v1.7.0-alpha05
March 20, 2024
androidx.compose.runtime:runtime-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits.
Bug Fixes
- Clear late changes on deactivated composition (5950bc)
Compose UI: v1.6.4
March 20, 2024
androidx.compose.ui:ui-*:1.6.4 is released. Version 1.6.4 contains these commits.
Compose UI: v1.7.0-alpha05
March 20, 2024
androidx.compose.ui:ui-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits.
New Features
- Introduce new
GraphicsLayerAPI to record drawing commands in a display list as well as additional properties that affect the rendering of the display list. This provides an isolation boundary to divide a complex scene into smaller pieces that can be updated individually of one another without recreating the entire scene. Transformations made to aGraphicsLayercan be done without re-recording the display list. UnlikeModifier.graphicsLayer,GraphicsLayerallows for rendering of Composable content elsewhere and is useful in animated use cases where content is expected to be rendered in different scenes.
API Changes
GraphicsLayer.draw(Canvas)is not a public api anymore. Please use theDrawScope.drawLayer(GraphicsLayer)extension function instead to draw the layer. (I7a7c0)- Split
restrictedConstraints()to two methods:fitPrioritizingWidth()andfitPrioritizingHeight()(I6d7fd) - Introduced
HardwareCanvasstub for Android L usage (I1c3b5, b/288494724) - Update Compose framework to expose a
GraphicsContextcomposition local alongside updating Owner,DelegateableNodeanddrawWithCacheModifier implementations to expose access to theGraphicsContextfor scoped access that will automatically cleanupGraphicsLayerinstances when Modifiers are torn down. (I64a2f, b/288494724) - Introduced
InterceptPlatformTextInputfor helping write low-level IME-related tests and other low-level IME use cases.PlatformTextInputTestOverridehas been deprecated. (I862ed, b/322680547) GraphicsLayer.setOutline(Outline)extension function was added. (Ib81f4)- Introduce
GraphicsContextfunction constructor to create a factory to createGraphicsLayerinstances (Ib98d6, b/288494724) - Exposed
GraphicsLayerAPI to provide developer defined flexibility in capturing drawing commands that can be used to draw elsewhere and also apply different visual effects to the end result. (I80245, b/288494724) - Introduce the
Paragraph#getRangeForRectwhich returns a range of text covered by a given rectangle area. (Iee516, b/325660505) - Removed experimental override of
BasicTextwithonLinkClickedargument. A replacement API for hyperlinks support will follow in the future. (I107d5)
Bug Fixes
- Added
GraphicsLayerexpect/actual API definition to support capturing and replaying of drawing commands with optional compositing visual effects and transforms. IntroduceGraphicsContextinterface to contain graphics dependencies including creation and management ofGraphicsLayerinstances. (I4a8d6, b/288494724) - Fixed an interop issue with 1D focus search where focus would get stuck inside a
ComposeViewthat was embedded among other views. (I08fd4)
External Contribution
LocalLifecycleOwnermoved from Compose UI tolifecycle-runtime-composeso that its Compose-based helper APIs can be used outside of Compose UI. Thanks Jake Wharton for the contribution. (I6c41b, b/328263448)- Consistently expose bias float properties on all bias-based alignment subtypes. (I69f0f, b/328088992)
Concurrent: v1.2.0-alpha03
March 20, 2024
androidx.concurrent:concurrent-futures:1.2.0-alpha03 and androidx.concurrent:concurrent-futures-ktx:1.2.0-alpha03 are released. Version 1.2.0-alpha03 contains these commits.
Bug Fixes
- Fixed a bug in error handling when a
SuspendToFutureAdaptertask throws an exception. (b/327629504)
Core and Core-ktx: v1.13.0-beta01
March 20, 2024
androidx.core:core:1.13.0-beta01, androidx.core:core-ktx:1.13.0-beta01, and androidx.core:core-testing:1.13.0-beta01 are released. Version 1.13.0-beta01 contains these commits.
API Changes
PathParseris nowfinal,interpolatePathDataNodesnow throws an exception for incompatible arguments instead of returning aboolean, andnodesToPathnow belongs toPathParserrather thanPathParser.PathDataNode. (I20d62)FingerprintManagerCompathas been soft-removed prior to its removal from the Android V platform SDK. The implementation will be replaced with a no-op in the near future, and developers should migrate away from this class immediately. (I7ca1b)- The
Poolinterface and its subclasses,SimplePoolandSynchronizedPoolare now written in Kotlin. The generic type of objects being stored in the Pool must now be non-null. (I08afe)
External Contribution
GestureDetectorCompatis now deprecated asGestureDetectoris guaranteed to be available in the platform at the library’s minimum SDK version. Thanks to Jake Wharton for the contribution. (Icc4cd)MarginLayoutParamsCompatis now deprecated asMarginLayoutParamsis guaranteed to be available in the platform as the library’s minimum SDK version. Thanks to Jake Wharton for the contribution. (I4e0c3)
Fragment: v1.7.0-beta01
March 20, 2024
androidx.fragment:fragment-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.
API Changes
FragmentHostCallbackis now written in Kotlin so that the nullability of the generic type of the Host matches the nullability of the return type ofonGetHost(). (I40af5)
Bug Fixes
- Fixed an issue where when committing a Predictive Back gesture on a fragment that is not in a container, that fragment would never be destroyed. The Fragment will now be immediately moved to the final state. (Ida0d9)
- Fixed an issue in Fragments where interrupting incoming transitions with a Predictive back gesture would destroy the entering view, and leave a blank screen. (Id3f22, b/319531491)
Games-Activity: v3.0.1
March 20, 2024
androidx.games:games-activity:3.0.1 and androidx.games:games-text-input:3.0.1 are released. Version 3.0.1 contains these commits.
Bug Fixes
- Fixed a problem with special characters being typed and displayed.
Lifecycle: v2.8.0-alpha03
March 20, 2024
androidx.lifecycle:lifecycle-*:2.8.0-alpha03 is released. Version 2.8.0-alpha03 contains these commits.
New Features
ViewModel.viewModelScopeis now an overridable constructor parameter, allowing you to inject your own dispatcher andSupervisorJob()or to override the default by using thebackgroundScopeavailable withinrunTest. (I2817c, b/264598574)class MyViewModel( // Make Dispatchers.Main the default, rather than Dispatchers.Main.immediate viewModelScope: CoroutineScope = Dispatchers.Main + SupervisorJob() ) : ViewModel(viewModelScope) { // Use viewModelScope as before, without any code changes }// Allows overriding the viewModelScope in a test
fun Test() = runTest {
val viewModel = MyViewModel(backgroundScope)
}
Kotlin Multiplatform Compatibility
The lifecycle-viewmodel artifact and APIs like ViewModel, ViewModelStore, ViewModelStoreOwner, and ViewModelProvider are now shipped in artifacts compatible with Kotlin Multiplatform. (b/214568825)
To accommodate this change, methods such as those on ViewModelProvider that took a java.lang.Class<T> now have an equivalent method that takes a kotlin.reflect.KClass<T>.
Binary compatibility on Android has been maintained, but there are a few notable changes when comparing the Android API surface to the common API surface:
- Constructing a
ViewModelProviderinstance is now done through theViewModelProvider.create()methods rather than directly calling its constructor. ViewModelProvider.NewInstanceFactoryandViewModelProvider.AndroidViewModelFactoryare only available on Android.- Custom Factories are recommended to extend from
ViewModelProvider.Factoryand use thecreatemethod that takes aCreationExtrasor use theviewModelFactoryKotlin DSL.
- Custom Factories are recommended to extend from
- Using
ViewModelProviderwithout a custom factory on non-JVM platforms will result in anUnsupportedOperationException. On JVM platforms, compatibility is preserved by using the no-args ViewModel constructor if a custom factory is not provided. viewModelScopewill fallback to anEmptyCoroutineContextin platforms whereDispatchers.Mainis not available (e.g., Linux).
Behavior Changes
InitializerViewModelFactory(includingviewModelFactorybuilder function) will now throw anIllegalArgumentExceptionif ainitializerwith the sameclazz: KClass<VM : ViewModel>has already been added. (Ic3a36)
Bug Fixes
ViewModel.getCloseablenow handles duplicated keys: if thekeyalready has anAutoCloseableresource associated with it, the old resource will be replaced and closed immediately. (Ibeb67)- Accessing the
viewModelScopeof aViewModelis now thread safe. (If4766, b/322407038)
External Contribution
LocalLifecycleOwnermoved from Compose UI to lifecycle-runtime-compose so that its Compose-based helper APIs can be used outside of Compose UI. Thanks Jake Wharton for the contribution. (I6c41b, b/328263448)
Mediarouter: v1.7.0
March 20, 2024
androidx.mediarouter:mediarouter:1.7.0 and androidx.mediarouter:mediarouter-testing:1.7.0 are released. Version 1.7.0 contains these commits.
API Changes
- Add
isSystemRoute()toMediaRouteDescriptorandRouteInfowhich returns true if the corresponding route is a system-managed route, which means that the system is the route provider and the app is in charge of feeding media samples to the system for their rendering (I949e4). Bluetooth headsets, wired headsets and built-in speakers are examples of system routes. - Deprecate
MediaRouter.removeRemoteControlClient. You should callsetMediaSessionCompat(MediaSessionCompat)instead ofaddRemoteControlClient(Object)so that there is no need to callremoveRemoteControlClient(Object). (I8fc5e). - Make
MediaRouteButtonextendAppCompatImageView. (Ib455e). - Add
DEVICE_TYPE_SMARTPHONE, which indicates that a media route is a smartphone. (I39837). - Improve device type mappings from
MediaRouter2to AndroidXMediaRouterto describe system routes (for example: Bluetooth, HDMI, wired). (Iccffa)
Bug Fixes
- Add missing icon resolutions for the route button that was possibly causing some isolated crashes. (cddba9, b/261878418).
- Fix bug causing
isSystemRouteto return true for user routes added viaandroid.media.MediaRouter#addUserRoute()(a27f6b).
New Features
- Bump the minSdk to 19. (e8c4463)
Navigation: v2.8.0-alpha05
March 20, 2024
androidx.navigation:navigation-*:2.8.0-alpha05 is released. Version 2.8.0-alpha05 contains these commits.
New Features
- You can now pass arguments to
NavGraph'sstartDestinationdirectly in thestartDestinationroute without relying ondefaultValue. This applies to nestedNavGraphstartDestinationsas well. (I0e0b5, b/109505019, b/188693139)
API Changes
- Added new abstract
CollectionNavType<T>class, a subclass ofNavType<T>for collection-based arguments such as list, arrays, maps. (Ic6d63, b/188693139) - All of the default
NavTypearrays (IntArrayType,LongArrayType,FloatArrayType,BoolArrayType, andStringArrayType) are now of typeCollectionNavType(Idcf79, b/188693139) NavTypenow provides a new openvalueEqualsAPI that determines if two values of the same type are equal to one another. (I6cb97, b/327229511)
Bug Fixes
- Query parameters in deep links now allows values in the form of curly braces around argument name (i.e.
{argName}) as valid values for string-basedNavTypes. This fixes an issue where such a value would be considered invalid (or absence of value) for all types. (I18302, b/327274038) NavControllerfunctions that support routes such asnavigateorpopBackStackcan now properly match routes filled with arguments of ArrayNavTypes. (Iea805, b/327229511)
Paging: v3.3.0-alpha05
March 20, 2024
androidx.paging:paging-*:3.3.0-alpha05 is released. Version 3.3.0-alpha05 contains these commits.
API Changes
- Paging now uses the AndroidX Annotation
@MainThreadannotation for common code. (I78f0d, b/327682438)
privacysandbox-tools: v1.0.0-alpha08
March 20, 2024
androidx.privacysandbox.tools:tools-*:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.
New Features
- Interfaces annotated with
@PrivacySandboxCallbackcan now have methods that return values as long as the method suspends.(I16063) - Bundles are now accepted as valid parameters and return types in annotated interfaces and values. (I52995)
Transition: v1.5.0-beta01
March 20, 2024
androidx.transition:transition:1.5.0-beta01 and androidx.transition:transition-ktx:1.5.0-beta01 are released. Version 1.5.0-beta01 contains these commits.
Bug Fixes
- Fixed an issue in Fragments where interrupting incoming transitions with a Predictive back gesture would destroy the entering view, potentially leaving a blank screen. (Id3f22, b/319531491)
Wear Compose: v1.4.0-alpha05
March 20, 2024
androidx.wear.compose:compose-*:1.4.0-alpha05 is released. Version 1.4.0-alpha05 contains these commits.
API Changes
- We have made the
initialCenterItemIndexandinitialCenterItemScrollOffsetproperties ofScalingLazyListStatepublic. (I0c616) - We have made the
FullScreenStrokeWidthfromProgressIndicatorDefaultspublic. (Ibea23)
Bug Fixes
- We have improved the performance of
PositionIndicatorby decreasing the number of calls tolayoutInfofromScalingLazyColumn. (Idc83d)
Wear Compose: v1.0.0-alpha20
April 6, 2022
androidx.wear.compose:compose-foundation:1.0.0-alpha20, androidx.wear.compose:compose-material:1.0.0-alpha20, and androidx.wear.compose:compose-navigation:1.0.0-alpha20 are released. Version 1.0.0-alpha20 contains these commits.
New Features
- Add
edgeSwipeToDismissmodifier forSwipeToDismiss. AllowsswipeToDismissto be active only on the left edge of the viewport. Used when the center of the screen needs to be able to handle horizontal paging, such as 2-d scrolling a Map or swiping horizontally between pages.(I3fcec, b/200699800)
API Changes
- Base implementation of
CurvedModifiers, this opens the way to introduce ways to customize curved content (but noCurvedModifiersare provided yet, and the ability to create custom modifiers may be available later) (I9b8df) EdgeSwipemodifier documentation and default values update for better understanding .(I6d00d)- Add
PageIndicatorslot into Scaffold. By addingPageIndicatordirectly into Scaffold we might assure that it will be correctly shown on circular devices. (Ia6042) - Remove default Icons from
InlineSliderand Stepper parameters. This will help developers to be more attentive to localization and accessibility requirements. Usages of default icons were shown in demos and samples. (I7e6fd) - Replace Trailing and Leading parameter names with Start and End in TimeText (Iaac32)
- We have added a
SwipeToDismissBoxoverload with anonDismissedparameter to support the common usage of triggering a navigation event when the swipe gesture has completed. (I50353, b/226565726) - Removed
ExperimentalWearMaterialApiannotations fromTimeTextusage (Ide520) - We have marked
ScalingLazyList/Columnscope and info interfaces as sealed as they are not intended for external developers to implement and this will allow us to add new members in them in future without binary breaking changes. (I7d99f) - We have added a new
flingBehaviourproperty to the Picker and aPickerDefaults.flingBehaviour()method to enable configuration of the fling behavior such as adding RSB support.PickerStatenow implements theScrollableStateinterface. (Ib89c7)
Bug Fixes
- Update the Android Runtime (ART) baseline profile rules for Wear Compose libraries. ART can leverage profile rules on devices in order to compile ahead-of-time a specific subset of the application to improve the performance of the application. Note that this will have no effect on debuggable applications. (Iaa8ef)
- Improve documentation (I2c051)
Webkit: v1.11.0-beta01
March 20, 2024
androidx.webkit:webkit:1.11.0-beta01 is released without any notable changes. Version 1.11.0-beta01 contains these commits.