Skip to content

2022-06-29

Choose a tag to compare

@github-actions github-actions released this 08 Jul 08:40
· 198 commits to main since this release
0c45d5e

Activity: v1.5.0

June 29, 2022

androidx.activity:activity:1.5.0, androidx.activity:activity-compose:1.5.0, and androidx.activity:activity-ktx:1.5.0 are released. Version 1.5.0 contains these commits.

Important changes since 1.4.0

  • ComponentDialog - ComponentDialog is a subclass of Dialog that includes an OnBackPressedDispatcher that will be called when the system back button is pressed and the dialog is visible. Importantly, this subclass also sets the ViewTreeOnBackPressedDispatcherOwner, allowing views a generic way to retrieve the correct dispatcher whether it exists in a ComponentActivity or a ComponentDialog.
  • Callback Interfaces - ComponentActivity now implements a set of modular callback interfaces that can be used instead of the Activity callbacks. These interfaces include the following: OnNewIntentProvider, OnConfigurationChangedProvider, OnTrimMemoryProvider, OnPictureInPictureModeChangedProvider, OnMultiWindowModeChangedProvider
  • CreationExtras Integration - ComponentActivity now has the ability to provide a stateless ViewModelProvider.Factory via Lifecycle 2.5.0’s CreationExtras.

Other changes

  • The no parameter constructor for ActivityResultContracts.CreateDocument has been deprecated and replaced with a new constructor that takes a concrete mime type (e.g., "image/png") as is required by Intent.ACTION_CREATE_DOCUMENT.

Camera-Camera2, Camera-Core, Camera-Lifecycle, & Camera-Video: v1.1.0

June 29, 2022

androidx.camera:camera-*:1.1.0 is released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

  • Landed View, Extension and Video Capture libraries as their first RC version. From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrices.
  • Introduced new public APIs and features which including:
  • Add the official camera-video library to support video capture use cases.
  • YUV to RGB conversion and rotation capability (ImageAnalysis.Builder.setOutputImageRotationEnabled and setOutputImageFormat)
  • Support multi-window mode by allowing CameraX applications to resume the camera when the camera is interrupted by another app and focus is back.
  • Ensures CameraX works well in foldable devices by fixing some preview issues.
  • Added a CameraState API that will be exposed through CameraInfo.
  • Added an API ProcessCameraProvider.getAvailableCameraInfos() to directly retrieve information about the available cameras
  • Output JPEG format for ImageCapture#OnImageCapturedCallback when Extensions are enabled.
  • Added a API isFocusMeteringSupported in CameraInfo which allows applications to check if the given FocusMeteringAction is supported on current camera or not.
  • Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis.
  • Added a new API ImageCapture.Builder#setJpegQuality to allow changing the output JPEG image compression quality when taking pictures.
  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector.
  • Added Camera2CameraControl.clearCaptureRequestOptions for clearing the existing capture request options.
  • Added an experimental API for using CameraController with external image processing libraries. e.g. MLKit
  • Added experimental API CameraInfo#getCameraSelector() which returns a CameraSelector unique to its camera
  • Promoted several experimental APIs to formal public APIs
  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental.
  • Promoted the following experimental APIs to official APIs: CameraXConfig.Builder#setAvailableCamerasLimiter(), CameraXConfig.Builder#setMinimumLoggingLevel(), CameraXconfig.Builder#setSchedulerHandler(), CameraXConfig#getAvailableCamerasLimiter(), CameraXConfig#getMinimumLoggingLevel(), CameraXConfig#getCameraExecutor(), CameraXConfig#getSchedulerHandler(),
  • @ExperimentalCameraFilter APIs
  • experimental exposure compensation APIs.
  • Promoted the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added ViewPort#getLayoutDirection, ViewPort.Builder#setLayoutDirection and ViewPort.Builder#setScaleType for customizing viewport.
  • Promoted the ExperimentalUseCaseGroupLifecycle to formal public APIs.
  • Changes to the existing APIs
  • Renamed MediaStoreOutputOptions.getCollection to MediaStoreOutputOptions.getCollectionUri.
  • ActiveRecording has been renamed to "Recording" to reduce verbosity.
  • Changed QualitySelector creator API to a list-based API

Bug Fixes

  • Fixed YuvToJpegProcessor EOFException issue when extension mode is enabled and ImageCapture#CAPTURE_MODE_MAX_QUALITY mode is set.
  • Fixed codec configuration failed due to video recording is closing
  • Fixed stretched preview/video aspect ratio when recording at FHD
  • Fixed audio/video out of sync after pause and resume on some devices
  • Fixed the issue where flash is triggered during tap-to-focus (startFocusAndMetering) when flash mode is auto or always_on in low-light environment.

CameraX: v1.2.0-alpha03

June 29, 2022

androidx.camera:camera-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.

API Changes

  • Removed the experimental annotation for ImageAnalysis.Analyzer and MLKitAnalyzer. (I0ff22)

Bug Fixes

  • Added auto focus default timeout 5000ms that will complete the AF part with isFocusSuccessful false if the FocusMeteringAction is not cancelled and the AF part is not converged in the duration. (Ibc2e3)
  • Fix the issue to take picture with unbind preview (I1d3a2, b/235119898)
  • Enabled advanced extender implementation and update the CameraX support extensions-interface version to 1.2 (I92256)

Collection: v1.3.0-alpha01

June 29, 2022

androidx.collection:collection:1.3.0-alpha01 and androidx.collection:collection-ktx:1.3.0-alpha01 are released. Version 1.3.0-alpha01 contains these commits.

New Features

  • collection-ktx extensions have been migrated into the main collections artifact, androidx.collection:collection. This change makes the pre-existing -ktx extensions accessible to Kotlin users without requiring the -ktx dependency, while still maintaining compatibility for existing users. Maintaining these extensions in a separate -ktx artifact is no longer beneficial since the main artifact has moved to Kotlin. (I6eef2)

API Changes

  • ArraySet now extends AbstractMutableCollection and no longer directly implements the Collection interface. (If6da0, b/230860589)
  • Converted ArraySet to Kotlin. Due to stricter typing, some Kotlin calls may no longer compile. (Id68c1, b/230860589)
    • The following calls have the argument type T, not T?:
      • ArraySet<T>.contains(null)
      • ArraySet<T>.add(null)
      • ArraySet<T>.remove(null)
    • The following calls have the return type T?, not T!:
      • ArraySet<T?>.valueAt(n)
      • ArraySet<T?>.removeAt(n)
      • ArraySet<T?>().iterator().next()
    • The following calls are no longer possible from Kotlin:
      • set.toArray() - use set.toTypedArray()
      • set.toArray(array) - use set.forEachIndexed(array::set)
  • Combine overloaded constructor for SparseArrayCompat as an optional argument for Kotlin users. (If8407, b/227474719)
  • Remove operator syntax for SparseArrayCompat.get(key, defaultValue). Note this still allows operator syntax for .get(key), but better aligns the API surface of SparseArrayCompat with the other classes in this library. (I9a38d)
  • Migrate LongSparseArray extensions into the main artifact, androidx.collection:collection. This change makes the pre-existing -ktx extensions accessible to Kotlin users without requiring the -ktx dependency, while still maintaining compatibility for existing users. Maintaining these extensions in a separate -ktx artifact is no longer beneficial since the main artifact has moved to Kotlin. (I8659a)
  • Convert LongSparseArray to Kotlin. This change adds explicit nullity to its types, which is a binary compatible change, but may cause source incompatibilities. In particular: * .isEmpty is no longer accessible as a property, it must be accessed as a function call in Kotlin - .isEmpty() (Idfd0f)
  • Convert SimpleArrayMap to Kotlin. This change introduces a few incompatible changes, as a result of Java-Kotlin interop and the ability to correctly define nullity of types in the source.
    • The package private APIs, .mSize, .mArray, .mHashes, .indexOf(), .indexOfNull(), and .indexOfValue(), were made private - this is technically a binary incompatible change, but reflects the intended visibility of these fields and is the closest we can achieve in Kotlin since it does not include a way to specify package-private visibility.
    • The nullity of some types are now properly defined, the affected methods are: .getOrDefault, .keyAt, .valueAt, .setValueAt, .put, .putIfAbsent, .removeAt, .replace.
    • For Kotlin users, .isEmpty() is now only available as a function instead of also through property access. (I271b7, b/182813986)
  • Convert CircularArray to Kotlin. Notable changes:

    • Corrects the nullity of its generics to be non-null, which was previously impossible to declare, but was enforced in all of its public APIs.
    • Due to Kotlin's Java interop, it was previously possible to access certain methods as both properties or functions. However, to reduce duplication while maintaining binary compatibility, it was necessary to remove these, which is a source-incompatible change. The affectedn calls are: .isEmpty, .getLast() and .getFirst(). (Ifffac)
  • Convert CircularIntArray to Kotlin. Due to Kotlin's Java interop, it was previously possible to access certain methods as both properties or functions. However, to reduce duplication while maintaining binary compatibility, it was necessary to remove these, which is a source-incompatible change. The affected calls are: .isEmpty, .getLast() and .getFirst(). (Ie36ce)

  • Convert LruCache to Kotlin (Ia2f19)

  • Convert SparseArrayCompat to Kotlin. (If6fe8)

    A small behavior change is added to SparseArrayCompat.valueAt(), which no longer incorrectly returns null for un-initialized calls out of bounds of size() but within the provided initial capacity.

    This change also introduces the correct nullity for some types which was previously missing.

    • .get(): E? -> .get(): E
    • .replace(Int, Int?): Int? -> .replace(Int, Int): Int?
    • .replace(Int, Int?, Int?): Boolean -> .replace(Int, Int, Int): Boolean
    • .put(Int, Int?) -> .put(Int, Int)
    • .putIfAbsent(Int, Int?): Int? -> .putIfAbsent(Int, Int): Int?
    • .setValueAt(index: Int, value: Int?) -> .setValueAt(index: Int, value: Int)
    • .indexOfValue(value: Int?): Int -> .indexOfValue(value: Int): Int
    • .containsValue(value: Int?): Boolean -> .containsValue(value: Int): Boolean
    • .append(key: Int, value: Int?) -> .append(key: Int, value: Int)

Compose Animation: v1.2.0-rc03

June 29, 2022

androidx.compose.animation:animation:1.2.0-rc03, androidx.compose.animation:animation-core:1.2.0-rc03, and androidx.compose.animation:animation-graphics:1.2.0-rc03 are released. Version 1.2.0-rc03 contains these commits.

  • No changes since 1.2.0-rc02.

Compose Animation: v1.3.0-alpha01

June 29, 2022

androidx.compose.animation:animation:1.3.0-alpha01, androidx.compose.animation:animation-core:1.3.0-alpha01, and androidx.compose.animation:animation-graphics:1.3.0-alpha01 are released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • New LookaheadLayout that supports a lookahead pass before the actual measure/layout. This allows a pre-calculation of the layout when it changes, while permitting the post-lookahead measure/layout to use the pre-calculated size/position to animate the size and positions towards the target. SubcomposeLayouts are not yet supported, but will be in an upcoming release. (I477f5)

Compose Compiler: v1.2.0

June 29, 2022

androidx.compose.compiler:compiler:1.2.0 is released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

Compose Foundation: v1.2.0-rc03

June 29, 2022

androidx.compose.foundation:foundation:1.2.0-rc03 and androidx.compose.foundation:foundation-layout:1.2.0-rc03 are released. Version 1.2.0-rc03 contains these commits.

  • No changes since 1.2.0-rc02.

Compose Foundation: v1.3.0-alpha01

June 29, 2022

androidx.compose.foundation:foundation:1.3.0-alpha01 and androidx.compose.foundation:foundation-layout:1.3.0-alpha01 are released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • Introduced the UrlAnnotation annotation type and associated methods to support TalkBack link support in AnnotatedStrings. (I1c754, b/231495122)

Bug Fixes

  • BasicTextField cursorBrush may now be animated without restarting the cursor timer. (I812e6, b/236383522)
  • When adding InputEventChange events to Velocity Tracker we will consider now deltas instead of positions, this will guarantee the velocity is correctly calculated for all cases even if the target element moves (If9ef3, b/216582726, b/223440806, b/227709803)

Compose Material: v1.2.0-rc03

June 29, 2022

androidx.compose.material:material-*:1.2.0-rc03 is released. Version 1.2.0-rc03 contains these commits.

  • No changes since 1.2.0-rc02.

Compose Material: v1.3.0-alpha01

June 29, 2022

androidx.compose.material:material-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • Change parameter name from values to value in RangeSlider (I3b79a)

Bug Fixes

  • Update badge sample to provide more meaningful content description. (I10b9d)

Compose Material 3: v1.0.0-alpha14

June 29, 2022

androidx.compose.material3:material3:1.0.0-alpha14 and androidx.compose.material3:material3-window-size-class:1.0.0-alpha14 are released. Version 1.0.0-alpha14 contains these commits.

New Features

  • Added M3 list implementation, see the documentation for sample usage (Id7a20)

API Changes

  • Change parameter name from values to value in RangeSlider (I3b79a)
  • API changes to the InputChip implementation to support a selectable state per the Material Design spec. Additional support at the FilterChip colors for selected disabled state. (I55244, b/235792432)
  • Add BottomAppBar default FAB (Ida4c8)
  • ColorScheme.surfaceColorAtElevation was added (Id41af)
  • Interfaces in compose libraries are now built using jdk8 default interface methods (I5bcf1)
  • WindowWidthSizeClass and WindowHeightSizeClass now implement Comparable, so they can be compared using operators (<, <=, >=, >) and other APIs. (I747d0)

Bug Fixes

  • Update badge sample to provide more meaningful content description. (I10b9d)
  • Adds option to use the system font size to the Material 3 catalog's theme picker. (I10605)
  • Adds sample code for Badge and indeterminate progress indicators. (I8fbe0)

Compose Runtime: v1.2.0-rc03

June 29, 2022

androidx.compose.runtime:runtime-*:1.2.0-rc03 is released. Version 1.2.0-rc03 contains these commits.

Bug Fixes

  • Derived state observations were previously unconditionally removed from the recompose scope and composition together, which broke other scopes which might be still observing derived state. This change only removes derived state instances if it is no longer observed by other scopes. (b/236618362)

Compose Runtime: v1.3.0-alpha01

June 29, 2022

androidx.compose.runtime:runtime-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • Moving utility functionality to runtime (I4f729)

Compose UI: v1.2.0-rc03

June 29, 2022

androidx.compose.ui:ui-*:1.2.0-rc03 is released. Version 1.2.0-rc03 contains these commits.

  • No changes since 1.2.0-rc02.

Compose UI: v1.3.0-alpha01

June 29, 2022

androidx.compose.ui:ui-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • New LookaheadLayout that supports a lookahead pass before the actual measure/layout. This allows a pre-calculation of the layout when it changes, while permitting the post-lookahead measure/layout to use the pre-calculated size/position to animate the size and positions towards the target. SubcomposeLayouts are not yet supported, but will be in an upcoming release. (I477f5)
  • Add optional alpha parameter to Brush flavor of TextStyle and SpanStyle to modify opacity of the whole Text. (Ic2fac, b/234117635)
  • Introduced the UrlAnnotation annotation type and associated methods to support TalkBack link support in AnnotatedStrings. (I1c754, b/231495122)
  • Moving utility functionality to runtime (I4f729)

Bug Fixes

  • When adding InputEventChange events to Velocity Tracker we will consider now deltas instead of positions, this will guarantee the velocity is correctly calculated for all cases even if the target element moves (If9ef3, b/216582726, b/223440806, b/227709803)
  • TextLayoutResult.getLineForOffset does not throw. (Idc5d6, b/235876324)

External Contribution

  • Added a new API WindowInfo.keyboardModifiers to observe its state within composable functions or via snapshotFlow (Icdb8a)

Core Remote Views: v1.0.0-beta01

June 29, 2022

androidx.core:core-remoteviews:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

New Features

  • Moves Core-RemoteViews to beta.

Core Ultra Wideband (UWB): v1.0.0-alpha02

June 29, 2022

androidx.core.uwb:uwb-rxjava3:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.

New Features

  • Introducing a java interoperable artifact for the uwb module. The new artifact depends on rxjava3 and will be consumable for java clients.

Fragment: v1.5.0

June 29, 2022

androidx.fragment:fragment:1.5.0, androidx.fragment:fragment-ktx:1.5.0, and androidx.fragment:fragment-testing:1.5.0 are released. Version 1.5.0 contains these commits.

Important changes since 1.4.0

  • CreationExtras Integration - Fragment now has the ability to provide a stateless ViewModelProvider.Factory via Lifecycle 2.5.0’s CreationExtras.
  • Component Dialog Integration - DialogFragment now uses ComponentDialog via Activity 1.5.0 as the default dialog returned by onCreateDialog().
  • Saved Instance State Refactoring - Fragments have begun to change the way they save their instance state. This is an effort to help clearly identify what state has been saved in the fragment and the source of the state. The current changes include the following:
    • FragmentManager now saves its saved instance state into a Bundle instead of directly in a custom Parcelable.
    • Results set via the Fragment Result APIs that have not yet been delivered are now saved separately from the internal state of the FragmentManager.
    • The state associated with each individual fragment is now saved separately from the internal state of the FragmentManager, thus allowing you to correlate the amount of saved state associated with an individual fragment with the unique IDs present in the Fragment debug logging.

Other Changes

  • FragmentStrictMode now offers the ability for private third-party fragments to bypass specific violation penalties by using allowViolation() with the class name.
  • The Fragment APIs for providing a menu to your activity’s ActionBar have been deprecated. The MenuHost and MenuProvider APIs added in Activity 1.4.0 provide a testable, lifecycle aware equivalent API surface that fragments should use.

Lifecycle: v2.5.0

June 29, 2022

androidx.lifecycle:lifecycle-*:2.5.0 is released. Version 2.5.0 contains these commits.

Important changes since 2.4.0

  • SavedStateHandle now offers a getStateFlow() API that returns a Kotlin StateFlow for monitoring value changes as an alternative to using LiveData.

  • ViewModel CreationExtras - when writing a custom ViewModelProvider.Factory, it is no longer required to extend AndroidViewModelFactory or AbstractSavedStateViewModelFactory to gain access to an Application or SavedStateHandle, respectively. Instead, these fields are provided to every ViewModelProvider.Factory subclass as CreationExtras via the new overload of create: create(Class<T>, CreationExtras). These extras are provided automatically by your Activity or Fragment when using Activity 1.5.0 and Fragment 1.5.0, respectively.

    class CustomFactory : ViewModelProvider.Factory {
        override fun <T : ViewModel> create(modelClass: Class<T>, extras: CreationExtras): T {
            return when (modelClass) {
                HomeViewModel::class -> {
                    // Get the Application object from extras
                    val application = checkNotNull(extras[ViewModelProvider.AndroidViewModelFactory.APPLICATION_KEY])
                    // Pass it directly to HomeViewModel
                    HomeViewModel(application)
                }
                DetailViewModel::class -> {
                    // Create a SavedStateHandle for this ViewModel from extras
                    val savedStateHandle = extras.createSavedStateHandle()
                    DetailViewModel(savedStateHandle)
                }
                else -> throw IllegalArgumentException("Unknown class $modelClass")
            } as T
        }
    }
    
  • lifecycle-viewmodel now provides a viewModelFactory Kotlin DSL that allows you define your ViewModelProvider.Factory in terms of one or more lambda initializers, one for each particular ViewModel class your custom factory supports, using CreationExtras as the primary data source.

    val customFactory = viewModelFactory {
        // The return type of the lambda automatically sets what class this lambda handles
        initializer {
            // Get the Application object from extras provided to the lambda
            val application = checkNotNull(get(ViewModelProvider.AndroidViewModelFactory.APPLICATION_KEY))
            HomeViewModel(application)
        }
        initializer {
            val savedStateHandle = createSavedStateHandle()
            DetailViewModel(savedStateHandle)
        }
    }
    
  • lifecycle-viewmodel-compose now offers a viewModel() API that takes a lambda factory for creating a ViewModel instance without requiring the creation of a custom ViewModelProvider.Factory.

    // Within a @Composable, you can now skip writing a custom Factory
    // and instead write a lambda to do the initialization of your ViewModel
    val detailViewModel = viewModel {
      // This lambda is only called the first time the ViewModel is created
      // and all CreationExtras are available inside the lambda
      val savedStateHandle = createSavedStateHandle()
      DetailViewModel(savedStateHandle)
    }
    
  • SavedStateHandle Compose Saver Integration - the lifecycle-viewmodel-compose artifact now contains new experimental APIs in SavedStateHandle.saveable that allow rememberSaveable like behavior backed by the SavedStateHandle of a `ViewModel.

    class ListScreenViewModel(handle: SavedStateHandle): ViewModel() {
        // This value survives both configuration changes and process death and recreation
        val editMode by handle.saveable { mutableStateOf(false) }
    }
    
  • Added an addCloseable() API and a new constructor overload that allow you to add one or more Closeable objects to the ViewModel that will be closed when the ViewModel is cleared without requiring any manual work in onCleared().

    For instance, to create a coroutine scope that you can inject into a ViewModel, but control via testing, you can create a CoroutineScope that implements Closeable:

    class CloseableCoroutineScope(
        context: CoroutineContext = SupervisorJob() + Dispatchers.Main.immediate
    ) : Closeable, CoroutineScope {
        override val coroutineContext: CoroutineContext = context
        override fun close() {
            coroutineContext.cancel()
       }
    }
    

    Which can then be used in your ViewModel constructor while maintaining the same lifetime as viewModelScope:

    class TestScopeViewModel(
        val customScope: CoroutineScope = CloseableCoroutineScope()
    ) : ViewModel(customScope) {
        // You can now use customScope in the same way as viewModelScope
    }
    

Behavior changes

  • Attempting to move the Lifecycle.State from INITIALIZED to DESTROYED will now always throw an IllegalStateException regardless of whether the Lifecycle has an attached observer.
  • LifecycleRegistry will now clear their observers when they reach the DESTROYED state.

Lifecycle: v2.6.0-alpha01

June 29, 2022

androidx.lifecycle:lifecycle-*:2.6.0-alpha01 is released. Version 2.6.0-alpha01 contains these commits.

New Features

  • Added a new extension on StateFlow and Flow of collectAsStateWithLifecycle that collect from flows and represents its latest value as Compose State in a lifecycle-aware manner. The flow is collected and the new emission is set to the State's value when the lifecycle is at least in a certain Lifecycle.State. When the lifecycle falls below that Lifecycle.State, the flow collection stops and the State's value is not updated. (I1856e, b/230557927)

Metrics: v1.0.0-alpha02

June 29, 2022

androidx.metrics:metrics-performance:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.

API Changes

Bug Fixes

Navigation: v2.5.0

June 29, 2022

androidx.navigation:navigation-*:2.5.0 is released. Version 2.5.0 contains these commits.

Important changes since 2.4.0

  • CreationExtras Integration - Navigation now has the ability to provide a stateless ViewModelProvider.Factory via Lifecycle 2.5.0’s CreationExtras.

Navigation SafeArgs

  • Navigation Safe Args has upgraded the Android Gradle Plugin dependency to rely on 7.0.4, dropping compatibility for AGP versions before 7.0.
  • Added support for the namespace build.gradle attribute to be used instead of applicationId.

Other Changes

  • The visibleEntries API is no longer experimental and provides a function to retrieve all of the entries whose destination is currently visible according to the NavController.

Recyclerview:

Savedstate: v1.2.0

June 29, 2022

androidx.savedstate:savedstate:1.2.0 and androidx.savedstate:savedstate-ktx:1.2.0 are released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

  • SavedStateRegistryController now allows early attachment of the SavedStateRegistry via performAttach().
  • You can now retrieve a previously registered SavedStateProvider from a SavedStateRegistry via getSavedStateProvider().
  • The SavedState library has been rewritten in Kotlin.
    • For SavedStateRegistryOwner, this is a source incompatible change for those classes written in Kotlin - you must now override the savedStateRegistry property rather than implement the previous getSavedStateRegistry() function.
    • For ViewTreeSavedStateRegistryOwner, this is a source incompatible change for those classes written in Kotlin - you must now directly import and use the Kotlin extension methods on View of androidx.savedstate.setViewTreeSavedStateRegistryOwner and androidx.savedstate.findViewTreeSavedStateRegistryOwner to set and find a previously set owner. This replaces the savedstate-ktx API of findViewTreeSavedStateRegistryOwner.

Behavior Changes

  • SavedStateRegistry no longer saves an empty Bundle if there is no state to save.

Wear Compose: v1.1.0-alpha01

June 29, 2022

androidx.wear.compose:compose-foundation:1.1.0-alpha01, androidx.wear.compose:compose-material:1.1.0-alpha01, and androidx.wear.compose:compose-navigation:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.

API Changes

  • Picker's contentDescription parameter is now used only for the selected Picker option and takes a nullable String (previously, it was necessary to pass a mapping from option to the content description, but only the selected option was used). (Ife6a7)
  • We have made accessibility improvements to Picker so that multi-picker screens are navigable with screen readers and the content description is accessible (I64edb)

Bug Fixes

  • We have updated the baseline profile rules packaged with the Wear Compose library (I9c694)
  • We have corrected the direction of the gradient for Chips in right to left mode. Was top left->bottom right, is now top right->bottom left. (Ic2e77)
  • We have updated the default gradients for Chip/ToggleChip/Card to bring them in line with latest UX spec. ChipDefaults.gradientBackgroundChipColors has been updated to start from 50% of primary rather than 32.5%. CardDefaults.cardBackgroundPainter has been updated to start from 30% of primary and end at 20% of onSurfaceVariant (was previously 20% to 10% onSurfaceVariant). ToggleChip.toggleChipColors changes from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. (I43bbd)
  • We have added a background color (MaterialTheme.color.surface) behind Chip/ToggleChips that have gradient backgrounds in order to ensure that they are properly visible in the unlikely event that a light color is used behind them. (Ibe1a4, b/235937657)
  • Picker items are now always center-aligned, fixing a bug when setting gradientRatio to zero had the side-effect of changing the alignment. (I712b8)

Wear Tiles: v1.1.0-alpha09

June 29, 2022

androidx.wear.tiles:tiles-*:1.1.0-alpha09 is released. Version 1.1.0-alpha09 contains these commits.

New Features

  • We have added support for adding optional labels in ProgressIndicatorLayout. (I30788)

API Changes

  • Helper methods for ElementMetadata now accept ElementMetadata instead of Modifiers. (I5a70f)

Bug Fixes

  • The limitation of 9 characters on CompactChip was removed. If text is too big to fit into the screen in PrimaryLayout, it will be ellipsized. (Id56ec)
  • Getters in Chip now have Content suffix. (Iba437)
  • Javadoc clarification across Tiles Material classes. (I56e41), (I80f31), (Iba437)

Webkit: v1.5.0-beta01

June 29, 2022

androidx.webkit:webkit:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Alogrithimic Darkening related APIs are now annotated to require API level Q. The API will not have any effect on API levels < Q, since dark theme is not an option on these devices. (I0905e)