Skip to content

2024-09-05

Choose a tag to compare

@github-actions github-actions released this 06 Sep 01:53
· 66 commits to main since this release

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 PredictiveBackHandler API 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 an IndexOutOfBoundsException. (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 PickVisualMedia and PickMultipleVisualMedia Activity 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 public ACTION_SYSTEM_FALLBACK_PICK_IMAGES action 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 Compose PredictiveBackHandler API 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 an IndexOutOfBoundsException. (Ie3301, b/340202286)
  • From Activity 1.9.1: Fixed an issue with PredictiveBackHandler where after doing system back, attempting to do onBackPressed from the OnBackPressedDispatcher would 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 setEmbeddingSearchEnabled and getEmbeddingSearchEnabled. Deletes setListFilterTokenizeFunctionEnabled and getListFilterTokenizeFunctionEnabled. Deleted the 'tokenize' query function. Replaced with getSearchStringParameter query function and addSearchStringParameter function. (I09f5a)
  • Rename Alarm#getComputingDevice to getOriginatingDevice. (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.getCameraInfo to 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 bindToLifecycle is invoked with a destroyed LifecycleOwner. (I6e6d8)
  • Fixed Preview is black screen in front camera while binding with VideoCapture on Motorola Edge 20 Fusion. (I1fe88)
  • Optimized the configuration for detecting zoom gestures in PreviewView to 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

  • OrderedScatterSet is a new ordered, allocation-free collection (Ic4178)
  • SieveCache is a new allocation-free replacement for LruCache that offers better hit ratio characteristics. (I50a17)
  • Exposed the packedValue internal representation for IntIntPair and FloatFloatPair. (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 scaleInSharedContentToBounds and scaleOutSharedContentToBounds to scale content in sharedBounds (I731c1)
  • Experimental SharedTransitionScope is now an interface rather than a class. (Iaf856)
  • New resizeModes (ScaleToBounds and RemeasureToBounds) for sharedBounds to choose between scaling and remeasure. The previous scaleIn/OutSharedContentToBounds APIs are now deprecated. (I0d41a)

Improvements to existing APIs:

  • New Modifier.animateContentSize that takes an additional parameter for custom content alignment. (I5623a, b/269803907)
  • New Experimental DeferredTargetAnimation for animating size, position, or any other target that is unknown during instantiation. (I60745)
  • SeekableTransitionState replaces snapTo() with seekTo(), and adds a snapTo() that immediately changes the state to a destination state without any kind of animation.
  • You may now pass a periodicBias value (Float) to keyframesWithSpline, 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.transition is now a stable API. Modifier.animateEnterExit(..) has also been made stable. (I6c1d1)
  • ApproachLayoutModifierNode and Modifier.approachLayout are now stable, with new isMeasurementApproachInProgress() and isPlacementApproachInProgress() to replace the old isMeasurementApproachComplete() and isPlacementApproachComplete() respectively.
  • Removed deprecated intermediateLayout modifier. (I3e91c)
  • LookaheadScope APIs 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.animateBounds API 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 placeHolderSize logic when no match is found (77c0160)
  • Clamp play time in AndroidFlingSpline to prevent crashes due to non-monotonically increasing play time(9d47587)

External Contribution

  • Prevent setting seekable transition playTime when no transition is running by Steven Schoen. (c2e6e7e6)
  • Fix SharedTransitionScope not 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.scrollable and Modifier.draggable has 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) rememberUpdatedInstance API. For migration information, see developer.android.com.
    • clickable / combinedClickable / selectable / toggleable now accepts a nullable MutableInteractionSource parameter. If null, and the provided Indication is an IndicationNodeFactory, the Indication can be lazily created only when needed, which improves performance. If you are not hoisting and using the MutableInteractionSource, it is recommended to pass null instead of passing remember { MutableInteractionSource() }.
    • Indication#rememberUpdatedInstance has been deprecated. It has a high unavoidable performance penalty, and prevents other optimizations. Instead, you should use the new IndicationNodeFactory API.
  • BasicTextField using a TextFieldState is now stable and we advise all call-sites to begin migration from BasicTextField(value, onValueChange) to BasicTextField(TextFieldState).
  • The ClickableText has been deprecated. To add clickable links to your text, use BasicText with the new LinkAnnotation annotation in your AnnotatedString. LinkAnnotation allows for custom styling based on link state (e.g. focused, hovered).
  • Introducing ContextualFlowRow and Enhanced FlowRow/Column with MaxLines and Overflow. We are excited to announce enhancements to the experimental FlowRow and FlowColumn, now featuring maxLines and overflow support, alongside the debut of ContextualFlowRow and ContextualFlowColumn. This update is designed to provide performance optimal components, where ContextualFlow* is perfect for a large number of items making use of a small maxLines config and dynamic +N see more buttons, and FlowRow and FlowColumn is perfect for a small number of items, less than 100 items. Important: To maintain existing behavior in FlowRow or FlowColumn where all items are composed regardless of if they fit the cross axis max, set overflow to FlowRowOverflow.Visible or FlowColumnOverflow.Visible during initialization. Explore ContextualFlowRowSample and FlowRowSample for examples of these new features in action. (Ib9135, b/293577082)
  • Item appearance and disappearance animation support was added into LazyColumn and LazyRow. Previously it was possible to add Modifier.animateItemPlacement() modifier in order to support placement (reordering) animations. We deprecated this modifier and introduced a new non-experimental modifier called Modifier.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).
  • NestedScroll sources Drag and Fling are being replaced by UserInput and SideEffect to accommodate for the extended definition of these sources that now include animations (Side Effect) and Mouse Wheel and Keyboard (UserInput).
  • LazyLayout prefetch 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 MutableInteractionSource and defaulted to remember { MutableInteractionSource() } now accept a nullable MutableInteractionSource and default to null instead. If you are not hoisting and using the MutableInteractionSource, 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, BackdropScaffold and 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.bottomSheet builder 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
  • [ModalBottomSheet] now supports Predictive Back on U+ (Iccf32, b/281967264, b/304850357)
  • [SearchBar] now supports Predictive Back on U+ (I657f8)
  • Nav Drawer (ModalDrawerSheet and DismissibleDrawerSheet) now supports Predictive Back on U+ as opt-in (Ie5b0b)
  • DropdownMenu now 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 ProgressIndicator to 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 PullToRefreshState to use fractional values instead of Dp units.
    • isRefreshing state is controlled by the user instead of PullToRefreshState.
    • Separated out the nested scroll connection from PullToRefreshState. It is handled by the new PullToRefreshBox or Modifier.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
  • 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)
  • Updated Slider and ProgressIndicator colors to follow the new Non-Text Contrast specs. (I26807)
  • SurfaceContainer variants are now used by components. Components which formally calculated color with Surface and TonalElevation now use SurfaceContainer roles 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

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 PaneExpansionState Saveable (61ff76f)

API Changes

  • Add missing pane expansion APis to scaffolds (Ic5bc0)
  • ThreePaneScaffoldDestinationItem.content renamed to contentKey. rememberListDetailPaneScaffoldNavigator and rememberSupportingPaneScaffoldNavigator default type argument changed from Nothing to Any. (I58749)
  • Mark ThreePaneScaffoldState as 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 using providesComputed instead of provides.
  • The value of a composition local can be obtained by using the currentValue property of the composition local accessible from within the lambda computing the value. This is used instead of current which is only accessible in @Composable functions. (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 to mutableStateOf(). The initial state of mutableStateListOf() and mutableStateMapOf() is empty.
  • Added Snapshot.isInSnapshot and Snapshot.PreexistingSnapshotId that 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 nonSkippingGroupOptimization for 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 onRelease callback in the same order as onForgotten. (2cd790)
  • Enable strong skipping mode (ed1766)
  • Make currentCompoundHashKey unique 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 isLightTheme attribute to themes of SplashScreen (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 asBundle and fromBundle helpers to allow these classes be passed across IPC more easily (I1a017)
  • MakePendingIntentHandler backward compatible. (I34c13)
  • Make CallingAppInfo backward compatible (I65085)
  • Expose ClearCredentialRequestTypes constants.

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

  • FragmentManager now correctly takes into account pending operations when handling the Predictive Back gesture. This should ensure that doing a system back no longer causes an IndexOutOfBoundsException. (I9ba32, b/342316801)
  • AndroidFragment no 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_UNAVAILABLE in HealthConnectClient.getSdkStatus() when HealthConnectManager is null in U+ 5802f
  • Add toString overrides to RecordClasses aa5dc
  • 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 FakePermissionController that can be used to emulate permissions checks

API Changes

  • Add FakeHealthConnectClient e8469
  • Add Stub overrides for FakeHealthConnectClient e8469

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.ReportFragment ProGuard rules to allow obfuscation . (ff898e1)

External Contribution

  • SavedStateHandle.saveable extension 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 the androidx.lifecycle.ReportFragment ProGuard rules to allow obfuscation . (ff898e1)

External Contribution

  • Move androidx.compose.ui.platform.LocalLifecycleOwner to 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.withPluginClasspath API.
  • Added checks for APIs that are problematic for lazy configuration by flagging calls to TaskContainer.withType without calling configureEach.
    • 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.

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 SeekableTransitionState APIs 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-compose artifact that includes a ComposableNavHostFragment alternative to NavHostFragment that allows you to add composable destinations to your Navigation XML files. Each composable destination must be expressed as a top-level, no argument @Composable method whose fully qualified name is used as the android:name attribute 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 of NavType<T> for collection-based arguments such as list, arrays, maps. All of the default NavType arrays (IntArrayType, LongArrayType, FloatArrayType, BoolArrayType, and StringArrayType) now inherit from this new class.
  • NavType now 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 FloatingActionButton icon is now available for single-page PDFs.
  • Overlapping issues between the Find in file bar and the FloatingActionButton have 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.
  • PdfViewerFragment has 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 LazyColumn into the Wear Compose Foundation library with associated LazyColumnState and LazyColumnScope APIs. This serves as the foundation for building customisable scaling and morphing effects with Wear Compose. (Ib3b22)
  • We have added an indexed version of itemsIndexed into LazyColumnScope as part of the new LazyColumn API. (Ib4a57)
  • We have added LazyColumn modifiers in order to support scaling and morphing behaviors. (Ie229a)
  • HierarchicalFocusCoordinator has been promoted to stable. (I31035)
  • We have added support for letter spacing to curved text. (I3c740)
  • Added a rotationLocked parameter to CurvedLayout.curvedComposable to stop components being rotated. (I66898)
  • The temporary LocalUseFallbackRippleImplementation API from wear material and wear material3 has been removed (I62282)
  • Removed WearDevices.SQUARE from the @WearPreviewDevices multi-preview (I11c02)

Bug Fixes

  • SwipeToReveal now positions the revealed items on the visible portion of the screen, this helps when SwipeToReveal is used within a list, so the items are always interactable and never fall outside the screen. (I38929)
  • SwipeToReveal now resets the lastActionType to None when animatedTo has completed. (I59b03)
  • Improved the documentation for the new rotationLocked parameter on curvedComposable. (Ifbd57)
  • Fixed a crash when passing NaN into ScalingLazyColumnSnapFlingBehavior’s performFling. (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 onDismissRequest callback was not being called when the dialog became invisible (I64656)
  • Renamed LayoutCoordinates.introducesFrameOfReference to LayoutCoordinates.introducesMotionFrameOfReference to 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 AppScaffold and ScreenScaffold components to the Material3 library, which include functionality to coordinate layering and transitions of TimeText and ScrollIndicator. AppScaffold provides a top level of scaffold components that sit on top of all screens. As such, adding TimeText to the AppScaffold allows it to remain in place while swiping between screens. Screens can themselves override or hide the time text. ScreenScaffold provides a slot for the ScrollIndicator and automatically animates the scroll indicator when scrolling, including timeout to hide the scroll indicator after inactivity. (I047d6)
  • We have added ScrollIndicator featuring 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 ScrollAway API such that ScreenStage is 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 ScreenScaffold for a bottom button (such as EdgeButton), that will be shown and resized depending on the scrolling content (I032eb)
  • We have added Modifier.scrollTransform and Modifier.targetMorphingHeight to add Material3 motion effects to items in LazyColumn. (Ie229a)
  • We have added SegmentedCircularProgressIndicator as a variation on CircularProgressIndicator. The segmented variation either shows a single progress value across all segments or shows each segment as being on/off. (I6e059)
  • We have added LinearProgressIndicator as an alternative to the existing CircularProgressIndicator. (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. OpenOnPhoneDialog is 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 TimeText to mitigate issues where the underlying content and the TimeText overlapped, 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 existing Stepper component to construct a volume screen. LevelIndicator is similar to ScrollIndicator, 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's text function. 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 RadioButton and SplitRadioButton - these components simplify the previous API by combining both the (Split)SelectableButton and the child radio control (If7ae8)
  • We have added CheckboxButton and SplitCheckboxButton - these components simplify the previous API by combining both the (Split)ToggleButton and the child Checkbox control (Ia8f70)
  • We have added SwitchButton and SplitSwitchButton - these components simplify the previous API by combining both the (Split)ToggleButton and the child Switch control (I0d349)
  • We have updated AnimatedText documentation 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 IconButton and TextButton when pressed. (Iffca5)
  • We have added an additional color variation, FilledVariant, to Button, IconButton, TextButton, CompactButton and EdgeButton (I65fc3)
  • We have added the forcedSize parameter to ImageWithScrimPainter, such that Button image backgrounds now maintain their component size by default. Setting the forcedSize = null adopts the Painter.instrinsicSize instead. (Ic57af)
  • We have added long-click to Buttons (Ib613d)
  • Long click support has also been added to IconButton and TextButton. (I38891)
  • Long click support has been added to Cards. (I305d5)
  • We have added LocalTextMaxLines, LocalTextAlign, LocalTextOverflow as CompositionLocals and used them as parameter defaults on Text. The composition locals can now be used by components such as CheckboxButton, SwitchButton, RadioButton to implement UX guidance, but the parameters can be overridden by developers if necessary. (Iab841)
  • We have added Placeholder to help in masking the content of components like buttons & cards until the data is loaded. (I1a532)
  • We have added IconToggleButtonColors and TextToggleButtonColors to replace the now removed ToggleButtonColors. (Ie0bf1)

Bug Fixes

  • We have updated Button, FilledTonalButton, OutlinedButton, ChildButton, CompactButton to use the new CompositionLocals LocalTextMaxLines, LocalTextAlign, LocalTextOverflow to 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 LevelIndicator to 6dp to differentiate it from the ScrollIndicator which has a stroke width of 4dp. (If6f63)
  • We have fixed an issue in TimeText so that larger sweep angles are supported. (Ie489f)
  • Fixed an issue during EdgeButton recomposition. (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

  • ScalingLazyColumn and Picker now support rotary input by default - it is recommended to remove explicit rotary handling and defer to the default system behavior. If necessary, use the rotaryScrollableBehavior parameter to configure either scroll or snap behavior - for snap behavior, it is recommended to provide snap behavior and touch scrolling capabilities using the flingBehavior parameter.
  • Modifier.rotaryScrollable is 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.
  • SwipeDismissableNavHost now provides an entry animation for in-app transitions.
  • PositionIndicator is now shown by default when a screen is first displayed.

Additional changes

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 WindowSizeClass so devs can use their own.
  • Add isAtLeast utility methods so that developers can process a range of WindowSizeClass values.
  • 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 WindowSizeClass API 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 a WindowSizeClass. The existing WindowWidthSizeClass and WindowHeightSizeClass will 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 WorkManager which 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 of WorkManager.

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 WorkManager didn’t call stopSelf(). This fix only applies to devices with API 34 and 35 where foreground service types were introduced. (ca06b2, b/364508145)
  • New WorkerParameters APIs that make it possible to switch the remote process that the Worker binds to when using a WorkerFactory. (Ibdc8a, Ie8a90, I7373f)

Bug Fixes

  • Fix a crash caused by WorkManager attempting 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)