Skip to content

2024-03-19

Choose a tag to compare

@github-actions github-actions released this 20 Mar 18:37
· 94 commits to main since this release

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-alpha02 caused by calling the OnBackPressedDispatcher as 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

  • SeekableTransitionState replaces snapTo() with seekTo(), and adds a snapTo() 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 startReplaceGroup instead of startReplacableGroup when a module is compiled with a runtime that contains this method. startReplaceGroup was introduced in the runtime in Compose Runtime 1.7.0-alpha03. Calls to startRestartGroup are only generated when targeting 1.7.0-alpha03 or later versions of the runtime.

  • Calling startReplaceGroup instead of startReplaceableGroup allows the runtime to detect changes more efficiently but may affect the order in which changes are detected by the Composer and sent to the Applier. This may result in subtle changes in behavior if an Applier relies 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 LocalTextLinkStyle composition local for styling hyperlinks. (Iebfa7)
  • Removed experimental override of BasicText with onLinkClicked argument. A replacement API for hyperlinks support will follow in the future. (I107d5)
  • Removed Codepoints related methods and properties under TextFieldState and TextFieldBuffer. Also removed the inChars suffixes from the remaining selection and composition related APIs. (Ief7ce)
  • AnchoredDraggable's currentValue will now update when passing through an anchor point. Use settledValue to receive the previous currentValue semantics, 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, TextFieldDecorator are graduated to stable. (I9582b)
  • Introduced InterceptPlatformTextInput for helping write low-level IME-related tests and other low-level IME use cases. PlatformTextInputTestOverride has been deprecated. (I862ed, b/322680547)
  • Split restrictedConstraints() to two methods: fitPrioritizingWidth() and fitPrioritizingHeight() (I6d7fd)

External Contribution

  • Added 2 new API isLastScrollForward/isLastScrollBackward to 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 ScaffoldSubcomposeInMeasureFix flag 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 lightColorScheme and darkColorScheme. (I9db52)

New Features

  • Added parameters to customize ExposedDropdownMenu. In particular, menus now have a focusable parameter (default true) that should be set to false when working with editable text fields. (I4184c, b/323694447, b/278609042)

API Changes

  • The ScaffoldSubcomposeInMeasureFix flag has been removed. (Ie2a4b)
  • NavigationRailItemColors is now marked as @Immutable. (If6112, b/327660613)
  • NavigationBarItemColors is now marked as @Immutable. (I42a30, b/298064514)
  • Reorder params in Slider Track composable. (I9f315)
  • ExposedDropdownMenu is now implemented using Popup. 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 ProgressIndicator colors 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 lightColorScheme and darkColorScheme. (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 AnimatedPane modifier 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 GraphicsLayer API 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 a GraphicsLayer can be done without re-recording the display list. Unlike Modifier.graphicsLayer, GraphicsLayer allows 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 the DrawScope.drawLayer(GraphicsLayer) extension function instead to draw the layer. (I7a7c0)
  • Split restrictedConstraints() to two methods: fitPrioritizingWidth() and fitPrioritizingHeight() (I6d7fd)
  • Introduced HardwareCanvas stub for Android L usage (I1c3b5, b/288494724)
  • Update Compose framework to expose a GraphicsContext composition local alongside updating Owner, DelegateableNode and drawWithCache Modifier implementations to expose access to the GraphicsContext for scoped access that will automatically cleanup GraphicsLayer instances when Modifiers are torn down. (I64a2f, b/288494724)
  • Introduced InterceptPlatformTextInput for helping write low-level IME-related tests and other low-level IME use cases. PlatformTextInputTestOverride has been deprecated. (I862ed, b/322680547)
  • GraphicsLayer.setOutline(Outline) extension function was added. (Ib81f4)
  • Introduce GraphicsContext function constructor to create a factory to create GraphicsLayer instances (Ib98d6, b/288494724)
  • Exposed GraphicsLayer API 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#getRangeForRect which returns a range of text covered by a given rectangle area. (Iee516, b/325660505)
  • Removed experimental override of BasicText with onLinkClicked argument. A replacement API for hyperlinks support will follow in the future. (I107d5)

Bug Fixes

  • Added GraphicsLayer expect/actual API definition to support capturing and replaying of drawing commands with optional compositing visual effects and transforms. Introduce GraphicsContext interface to contain graphics dependencies including creation and management of GraphicsLayer instances. (I4a8d6, b/288494724)
  • Fixed an interop issue with 1D focus search where focus would get stuck inside a ComposeView that was embedded among other views. (I08fd4)

External Contribution

  • LocalLifecycleOwner moved 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)
  • 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 SuspendToFutureAdapter task 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

  • PathParser is now final, interpolatePathDataNodes now throws an exception for incompatible arguments instead of returning a boolean, and nodesToPath now belongs to PathParser rather than PathParser.PathDataNode. (I20d62)
  • FingerprintManagerCompat has 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 Pool interface and its subclasses, SimplePool and SynchronizedPool are now written in Kotlin. The generic type of objects being stored in the Pool must now be non-null. (I08afe)

External Contribution

  • GestureDetectorCompat is now deprecated as GestureDetector is guaranteed to be available in the platform at the library’s minimum SDK version. Thanks to Jake Wharton for the contribution. (Icc4cd)
  • MarginLayoutParamsCompat is now deprecated as MarginLayoutParams is 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

  • FragmentHostCallback is now written in Kotlin so that the nullability of the generic type of the Host matches the nullability of the return type of onGetHost(). (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.viewModelScope is now an overridable constructor parameter, allowing you to inject your own dispatcher and SupervisorJob() or to override the default by using the backgroundScope available within runTest. (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 ViewModelProvider instance is now done through the ViewModelProvider.create() methods rather than directly calling its constructor.
  • ViewModelProvider.NewInstanceFactory and ViewModelProvider.AndroidViewModelFactory are only available on Android.
    • Custom Factories are recommended to extend from ViewModelProvider.Factory and use the create method that takes a CreationExtras or use the viewModelFactory Kotlin DSL.
  • Using ViewModelProvider without a custom factory on non-JVM platforms will result in an UnsupportedOperationException. On JVM platforms, compatibility is preserved by using the no-args ViewModel constructor if a custom factory is not provided.
  • viewModelScope will fallback to an EmptyCoroutineContext in platforms where Dispatchers.Main is not available (e.g., Linux).

Behavior Changes

  • InitializerViewModelFactory (including viewModelFactory builder function) will now throw an IllegalArgumentException if a initializer with the same clazz: KClass<VM : ViewModel> has already been added. (Ic3a36)

Bug Fixes

  • ViewModel.getCloseable now handles duplicated keys: if the key already has an AutoCloseable resource associated with it, the old resource will be replaced and closed immediately. (Ibeb67)
  • Accessing the viewModelScope of a ViewModel is now thread safe. (If4766, b/322407038)

External Contribution

  • LocalLifecycleOwner moved 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() to MediaRouteDescriptor and RouteInfo which 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 call setMediaSessionCompat(MediaSessionCompat) instead of addRemoteControlClient(Object) so that there is no need to call removeRemoteControlClient(Object). (I8fc5e).
  • Make MediaRouteButton extend AppCompatImageView. (Ib455e).
  • Add DEVICE_TYPE_SMARTPHONE, which indicates that a media route is a smartphone. (I39837).
  • Improve device type mappings from MediaRouter2 to AndroidX MediaRouter to 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 isSystemRoute to return true for user routes added via android.media.MediaRouter#addUserRoute() (a27f6b).

New Features

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's startDestination directly in the startDestination route without relying on defaultValue. This applies to nested NavGraph startDestinations as well. (I0e0b5, b/109505019, b/188693139)

API Changes

  • Added new abstract CollectionNavType<T> class, a subclass of NavType<T> for collection-based arguments such as list, arrays, maps. (Ic6d63, b/188693139)
  • All of the default NavType arrays (IntArrayType, LongArrayType, FloatArrayType, BoolArrayType, and StringArrayType) are now of type CollectionNavType (Idcf79, b/188693139)
  • NavType now provides a new open valueEquals API 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-based NavTypes. This fixes an issue where such a value would be considered invalid (or absence of value) for all types. (I18302, b/327274038)
  • NavController functions that support routes such as navigate or popBackStack can now properly match routes filled with arguments of Array NavTypes. (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 @MainThread annotation 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 @PrivacySandboxCallback can 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 initialCenterItemIndex and initialCenterItemScrollOffset properties of ScalingLazyListState public. (I0c616)
  • We have made the FullScreenStrokeWidth from ProgressIndicatorDefaults public. (Ibea23)

Bug Fixes

  • We have improved the performance of PositionIndicator by decreasing the number of calls to layoutInfo from ScalingLazyColumn. (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 edgeSwipeToDismiss modifier for SwipeToDismiss. Allows swipeToDismiss to 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 no CurvedModifiers are 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 PageIndicator slot into Scaffold. By adding PageIndicator directly into Scaffold we might assure that it will be correctly shown on circular devices. (Ia6042)
  • Remove default Icons from InlineSlider and 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 SwipeToDismissBox overload with an onDismissed parameter to support the common usage of triggering a navigation event when the swipe gesture has completed. (I50353, b/226565726)
  • Removed ExperimentalWearMaterialApi annotations from TimeText usage (Ide520)
  • We have marked ScalingLazyList/Column scope 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 flingBehaviour property to the Picker and a PickerDefaults.flingBehaviour() method to enable configuration of the fling behavior such as adding RSB support. PickerState now implements the ScrollableState interface. (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.