2024-05-14
Annotation: v1.8.0
May 14, 2024
androidx.annotation:annotation-*:1.8.0 is released. Version 1.8.0 contains these commits.
Important changes since 1.7.0
- Added
@ReplaceWithannotation to express replacements for deprecated APIs - The
@MainThreadannotation has been moved to the common source set.
Appcompat: v1.7.0-rc01
May 14, 2024
androidx.appcompat:appcompat:1.7.0-rc01 and androidx.appcompat:appcompat-resources:1.7.0-rc01 are released. Version 1.7.0-rc01 contains these commits.
Benchmark: v1.3.0-alpha05
May 14, 2024
androidx.benchmark:benchmark-*:1.3.0-alpha05 is released. Version 1.3.0-alpha05 contains these commits.
Bug Fixes
- Throw clearer exception when macrobench metric returns zero values for all iterations (Iab58f, b/314931695)
- Additional workaround rules added to microbench proguard rules, including support for listener rules and other observed warnings / errors. (I14d8f, b/329126308, b/339085669)
- Method tracing runs as a separate phase during a Macrobenchmark, and it no longer affects measurements. (If9a50, b/285912360, b/336588271)
- Added extra debugging suggestions to drop shader broadcast failure message. (I5efa6, b/325502725)
CameraX: v1.4.0-beta01
May 14, 2024
androidx.camera:camera-*:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits.
API Changes
- Added
ZoomGestureDetector.ZoomEventto encapsulates the states of a zoom gesture. (I84cdf)
Bug Fixes
- Fixed a bug that still capture and tap-to-focus do not use the repeating request FPS/stabilization mode values which may recreate capture session and cause latency issues or Preview freeze in some devices. (I7dc0b)
- Fixed a bug where High Resolutions can not be selected when
CameraEffectis enabled on some devices. (e.g. 4000x3000 on Samsung A32 5G). (Ie3ed3, b/337336152) - Fixed a crash when taking picture with Preview,
ImageCaptureandVideoCapture(UHD)are bound on Pixel 4XL API29. (I5b288) - Support virtual devices: Context passed into
ProcessCameraProviderwill preserve the device ID to ensure the functionality in a virtual device environment. (I5ba48)
CameraX: v1.4.0-alpha06
May 14, 2024
androidx.camera:camera-viewfinder:1.4.0-alpha06 and androidx.camera:camera-viewfinder-core:1.4.0-alpha06 are released. Version 1.4.0-alpha06 contains these commits.
API Changes
- Rename
Viewfinder'sImplementationModeEnums to better reflect underlying implementations, and add fixed constants forTransformationInfo.sourceRotation. (Ic6149) - Added
ZoomGestureDetector.ZoomEventto encapsulates the states of a zoom gesture. (I84cdf)
Camera Viewfinder Compose: v1.0.0-alpha01
May 14, 2024
androidx.camera:camera-viewfinder-compose:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.
New Features
- New library. This library introduces a Compose native Viewfinder composable, that can be used with CameraX and Camera2. The composable Viewfinder supports different aspect ratios, and handling of touch events.
Compose Animation: v1.7.0-beta01
May 14, 2024
androidx.compose.animation:animation-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.
API Changes
- New
resizeModes(ScaleToBoundsandRemeasureToBounds) forsharedBoundsto choose between scaling and remeasure. The previousscaleIn/OutSharedContentToBoundsAPIs are now deprecated. (I0d41a)
External Contribution
- Experimental
SharedTransitionScopeis now an interface rather than a class. (Iaf856, b/338415048, b/338414702)
Compose Compiler: v1.5.14
May 14, 2024
androidx.compose.compiler:compiler:1.5.14 and androidx.compose.compiler:compiler-hosted:1.5.14 are released. Version 1.5.14 contains these commits.
This compiler release is targeting Kotlin 1.9.24.
Bug Fixes
- Ensure that inline body is realized when source information is off. (Idddb8)
Compose Foundation: v1.7.0-beta01
May 14, 2024
androidx.compose.foundation:foundation-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.
API Changes
- Added
KeyboardOptions.shouldShowKeyboardOnFocusproperty back as deprecated hidden for binary compatibility. (I15cfe) Modifier.anchoredDraggablenow reverses drag deltas by default for components with a Horizontal orientation when used in an RTL layout. (I3c6d9)AnnotatedString.hasEqualsAnnotationsis nowhasEqualAnnotations. (I685c0)- Updated the API for getting Material themed links in text. Specifically, removed the methods from the
TextDefaultsfor constructing themedLinkAnnotationsand parse HTML with themed links. Instead, added aTextLinkStylesclass that allows to style the links as a parameter to the Text composable. (I31b93) - Replaced
onDragStartedandonDragStoppedwith non-suspend callbacks. (I59de8)
Bug Fixes
- Fixed a bug where Pager would crash when the
contentPaddingwas bigger than the incoming constraints. Pager now coerces negative values returned fromPageSizeto 0. (Iba5d8, b/314008560)
Compose Material: v1.7.0-beta01
May 14, 2024
androidx.compose.material:material-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.
API Changes
- Updated the API for getting Material themed links in Text. Specifically, removed the methods from the
TextDefaultsfor constructing themedLinkAnnotationsand parse HTML with themed links. Instead, added aTextLinkStylesclass that allows to style the links as a parameter to the Text composable. (I31b93)
Compose Material3: v1.3.0-beta01
May 14, 2024
androidx.compose.material3:material3-*:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.
API Changes
- Using
DpSizeinstead ofCaretProperties. RemovingCaretProperties. RenameCaretScopetoTooltipScope. (Id9a76) - Updated the API for getting Material themed links in text. Specifically, removed the methods from the
TextDefaultsfor constructing themedLinkAnnotationsand parse HTML with themed links. Instead, added aTextLinkStylesclass that allows to style the links as a parameter to the Text composable. (I31b93)
Compose Material3 Adaptive: v1.0.0-beta01
May 14, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
Compose Runtime: v1.7.0-beta01
May 14, 2024
androidx.compose.runtime:runtime-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.
Compose UI: v1.7.0-beta01
May 14, 2024
androidx.compose.ui:ui-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.
API Changes
- Renamed
performCustomAccessibilityActionLabelledtoperformCustomAccessibilityActionWithLabelandperformCustomAccessibilityActionWheretoperformCustomAccessibilityActionWithLabelMatching. (I5387f) AnnotatedString.hasEqualsAnnotationsis nowhasEqualAnnotations(I685c0)- Updated the API for getting Material themed links in text. Specifically, removed the methods from the
TextDefaultsfor constructing themedLinkAnnotationsand parse HTML with themed links. Instead, added aTextLinkStylesclass that allows to style the links as a parameter to the Text composable. (I31b93)
Bug Fixes
- Fixes additional use cases when dynamically adding pointer input modifiers during events 63e1504
Concurrent: v1.2.0-beta01
May 14, 2024
androidx.concurrent:concurrent-futures:1.2.0-beta01 and androidx.concurrent:concurrent-futures-ktx:1.2.0-beta01 are released. Version 1.2.0-beta01 contains these commits.
Core Remote Views: v1.1.0-rc01
May 14, 2024
androidx.core:core-remoteviews:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.
New Features
- Move
RemoteViews1.1.0 to Release Candidate.
Bug Fixes
- Move to 21 as the default
minSdkVersionof androidx libraries. (I6ec7f)
credentials: v1.3.0-alpha04
May 14, 2024
androidx.credentials:credentials:1.3.0-alpha04 and androidx.credentials:credentials-play-services-auth:1.3.0-alpha04 are released. Version 1.3.0-alpha04 contains these commits.
Bug Fixes
- Move to 21 as the default
minSdkVersionof androidx libraries. (I6ec7f) - Support PRF creation for Android versions 13 and below.
- Support
preferImmediatelyAvailableCredentialsfor Android versions 13 and below.
Fragment: v1.7.1
May 14, 2024
androidx.fragment:fragment-*:1.7.1 is released. Version 1.7.1 contains these commits.
Bug Fixes
- Predictive back will now only run for transactions in which all of the fragments have either a Animator or a Seekable Androidx Transition. This fixes an issue where canceling a partially seekable transaction would cause a blank screen. (I43037, b/339169168)
Fragment: v1.8.0-beta01
May 14, 2024
androidx.fragment:fragment-*:1.8.0-beta01 is released. Version 1.8.0-beta01 contains these commits.
Bug Fixes
- From Fragment
1.7.1: Predictive back will now only run for transactions in which all of the fragments have either a Animator or a Seekable Androidx Transition. This fixes an issue where canceling a partially seekable transaction would cause a black screen. (I43037, b/339169168)
Glance: v1.1.0-rc01
May 14, 2024
androidx.glance:glance-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.
New Features
- Added width and height parameters to Preview annotations for Glance. Moves 1.1.0 to Release Candidate.
API Changes
- Adds optional parameter to Scaffold. (If753f)
- Add width and height parameters to Glance
@Preview. (Ibabe8) - Remove support for glance wear tile previews. (I3850a)
- Added API for setting custom weight values for
FontStyle. (I7390a) - Rename
Viewfinder'sImplementationModeEnums to better reflect underlying implementations, and add fixed constants forTransformationInfo.sourceRotation(Ic6149)
Bug Fixes
- Fixed a bug that caused rendering issues for
ViewGroupsin backwards compatibility mode (I8de92)
External Contribution
- Experimental
SharedTransitionScopeis now an interface rather than a class. (Iaf856, b/338415048, b/338414702)
Health Services Client: v1.1.0-alpha03
May 14, 2024
androidx.health:health-services-client:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.
New Features
- Introduced
DebouncedGoalAPIs that allows tracking a goal for sample data type or stats sample data type during exercise with debouncing features(initialDelayanddurationAtThreshold). (I09be9) - Added the following advanced running metrics sample and statistical
DataTypes. (I0b8b5):Ground Contact TimeVertical OscillationVertical RatioStride Length
API Changes
- Added
ELEVATION_GAIN_DAILYDataType. (I059d1) - Added
SWIM_LAP_COUNT_TOTALDataTypeas the aggregatedDataTypeforSWIM_LAP_COUNT. (I0beeb)
Bug Fixes
- Fixed various issues to improve IPC reliability.
Lifecycle: v2.8.0
May 14, 2024
androidx.lifecycle:lifecycle-*:2.8.0 is released. Version 2.8.0 contains these commits.
Important changes since 2.7.0
LocalLifecycleOwnerhas been moved from Compose UI tolifecycle-runtime-composeso that its Compose-based helper APIs can be used outside of Compose UI.- The
lifecycle-runtime-composeartifact now contains thedropUnlessResumedanddropUnlessStartedAPIs which allow you to drop click or other events that occur even after theLifecycleOwnerhas dropped below the givenLifecycle.State. For example, this can be used with Navigation Compose to avoid handling click events after a transition to another screen has already begun:onClick: () -> Unit = dropUnlessResumed { navController.navigate(NEW_SCREEN) } ViewModel.viewModelScopeis now an overridable constructor parameter, allowing you to inject your own dispatcher andSupervisorJob()or to override the default by using thebackgroundScopeavailable withinrunTest. (I2817c, b/264598574)class MyViewModel( // Make Dispatchers.Main the default, rather than Dispatchers.Main.immediate viewModelScope: CoroutineScope = Dispatchers.Main + SupervisorJob() ) : ViewModel(viewModelScope) { // Use viewModelScope as before, without any code changes }// Allows overriding the viewModelScope in a test
fun Test() = runTest {
val viewModel = MyViewModel(backgroundScope)
}
ViewModelhas been rewritten in Kotlin and now usesAutoClosableinstead ofCloseable. It now supports addingAutoCloseableobjects with akeythat allows retrieving them viagetCloseable().Calling
LifecycleStartEffectandLifecycleResumeEffectwithout a key is now an error, following the same convention as theDisposableEffectAPI that these APIs mirror.Deprecated
LiveDataReactiveStreams.toPublisher(lifecycleOwner, liveData)in favor ofLiveData.toPublisher(lifecycleOwner).The
lifecycle-livedata-core-ktxkotlin extensions have now been moved to thelifecycle-livedata-coremodule.The
NullSafeMutableLiveDatahas been refactored to avoid many false positives.
Lifecycle Kotlin Multiplatform Compatibility
The core Lifecycle APIs in Lifecycle, LifecycleOwner, LifecycleObserver, Lifecycle.State, Lifecycle.Event, and LifecycleRegistry are now shipped in artifacts compatible with Kotlin Multiplatform.
Artifacts impacted:
lifecycle-commonmoves most APIs tocommonand supports jvm and iOS in addition to Android.lifecycle-runtimemoves most APIs tocommonand supports jvm and iOS in addition to Android.lifecycle-runtime-ktxis now empty, with all APIs being moved intolifecycle-runtime.lifecycle-runtime-composemoves all APIs tocommonand ships an Android artifact, matching the multiplatform support ofandroidx.compose.
ViewModel Kotlin Multiplatform Compatibility
The lifecycle-viewmodel artifact and APIs like ViewModel, ViewModelStore, ViewModelStoreOwner, and ViewModelProvider are now shipped in artifacts compatible with Kotlin Multiplatform.
To accommodate this change, methods such as those on ViewModelProvider that took a java.lang.Class<T> now have an equivalent method that takes a kotlin.reflect.KClass<T>.
Binary compatibility on Android has been maintained, but there are a few notable changes when comparing the Android API surface to the common API surface:
- Constructing a
ViewModelProviderinstance is now done through theViewModelProvider.create()methods rather than directly calling its constructor. ViewModelProvider.NewInstanceFactoryandViewModelProvider.AndroidViewModelFactoryare only available on Android.- Custom Factories are recommended to extend from
ViewModelProvider.Factoryand use thecreatemethod that takes aCreationExtrasor use theviewModelFactoryKotlin DSL.
- Custom Factories are recommended to extend from
- Using
ViewModelProviderwithout a custom factory on non-JVM platforms will result in anUnsupportedOperationException. On JVM platforms, compatibility is preserved by using the no-args ViewModel constructor if a custom factory is not provided. viewModelScopewill fallback to anEmptyCoroutineContextin platforms whereDispatchers.Mainis not available (e.g., Linux).
Artifacts impacted:
lifecycle-viewmodelmoves most APIs tocommonand supports jvm and iOS in addition to Android.lifecycle-viewmodel-ktxis now empty, with all APIs being moved intolifecycle-viewmodel.lifecycle-viewmodel-composemoves all APIs tocommonand ships an Android artifact, matching the multiplatform support ofandroidx.compose.
Behavior Changes
InitializerViewModelFactory(includingviewModelFactorybuilder function) will now throw anIllegalArgumentExceptionif ainitializerwith the sameclazz: KClass<VM : ViewModel>has already been added. (Ic3a36)
Navigation: v2.8.0-beta01
May 14, 2024
androidx.navigation:navigation-*:2.8.0-beta01 is released. Version 2.8.0-beta01 contains these commits.
API Changes
SavedStateHandle.toRoute()now takes in atypeMapparameter for custom argument types. (Ie39fb, b/339026523)- Added a test API to
navigation-testingto to create aSavedStateHandlefrom a Kotlin Serializable object. (Id4867, b/339080702)
Bug Fixes
- Missing parameter docs for Navigation Kotlin DSL functions have been added. (I26a36)
Paging: v3.3.0
May 14, 2024
androidx.paging:paging-*:3.3.0 is released. Version 3.3.0 contains these commits.
Important changes since 3.2.0
PagingDataPresenteris now a public class. Multiplatform presenters can now be built on top ofPagingDataPresenterrather than requiring internal Paging APIs orpaging-runtime’sAsyncPagingDataDiffer.- Added new
LoadStatesandCombinedLoadStateshelper methods inhasErrorandisIdleto check ifLoadStatesis in Error orNotLoadingstate, respectively. Also added a newawaitNotLoading()Kotlin extension method onFlow<CombinedLoadStates>that waits until a load has settled into eitherNotLoadingor Error state. PagingData.empty()now dispatchesNotLoadingstates by default unless customLoadStatesare passed to its constructor. This departs from existing behavior where it doesn't dispatchLoadStateswhen submitted to aPagingDataAdapteror it dispatches Loading states when collected asLazyPagingItems. When collected asLazyPagingItems, it will now also display an empty list immediately upon initial composition.
Kotlin Multiplatform Compatibility
Paging now ships artifacts compatible with Kotlin Multiplatform, thanks in large part to upstreamed work from CashApp's multiplatform-paging project.
paging-commonhas moved all Paging 3 APIs tocommonand is now compatible with jvm and iOS in addition to Android.paging-testinghas moved its code tocommonand is now compatible with jvm and iOS in addition to Android.paging-composehas moved its code tocommonand ships an Android artifact, matching the multiplatform support ofandroidx.compose.paging-runtime,paging-guava,paging-rxjava2, andpaging-rxjava3will remain Android only.
privacysandbox ads: v1.1.0-beta07
May 14, 2024
androidx.privacysandbox.ads:ads-adservices:1.1.0-beta07 and androidx.privacysandbox.ads:ads-adservices-java:1.1.0-beta07 are released. Version 1.1.0-beta07 contains these commits.
New Features
GetTopicsnow supports encrypted responses as part ofGetTopicsResponse.
API Changes
- Added
EncryptedTopictoGetTopicResponseclass. (Iab362)
privacysandbox ui: v1.0.0-alpha08
May 14, 2024
androidx.privacysandbox.ui:ui-client:1.0.0-alpha08, androidx.privacysandbox.ui:ui-core:1.0.0-alpha08, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha08 are released. Version 1.0.0-alpha08 contains these commits.
New Features
- Added support for using
SandboxedSdkViewinside aPoolingContainersuch as aRecyclerView. When aSandboxedSdkViewhas a parent that is aPoolingContainer, the lifecycle of its UI sessions will be aligned with that of thePoolingContainerto ensure that the session can persist through window detachment.
API Changes
- Deprecated Privacy Sandbox Activity APIs. These APIs can now be found in the dedicated Activity library
androidx.privacysandbox.activityinstead. (I68beb)
Bug Fixes
- Fixed rendering bug when displaying remote content inside pooling containers. (I804df)
- Fixed a bug that caused rendering issues for
ViewGroupsin backwards compatibility mode. (I8de92) - When one of
SandboxedSdkView's parents is aPoolingContainer, close the UI Session when thePoolingContainerindicates resources can be released, instead of on window detachment. (I2046b)
External Contribution
GestureDetectorCompatis now deprecated asGestureDetectoris available from theminSdk. (Icc4cd)
Room: v2.7.0-alpha02
May 14, 2024
androidx.room:room-*:2.7.0-alpha02 is released. Version 2.7.0-alpha02 contains these commits.
Bug Fixes
- Fixed various KSP issues.
Sqlite: v2.5.0-alpha02
May 14, 2024
androidx.sqlite:sqlite-*:2.5.0-alpha02 is released with no significant changes since 2.5.0-alpha01 . Version 2.5.0-alpha02 contains these commits.
ViewPager2: v1.1.0
May 14, 2024
androidx.viewpager2:viewpager2:1.1.0 is released. Version 1.1.0 contains these commits.
Important changes since 1.0.0
- Fixes crashes when used with RecyclerView
1.3.1-rc01or higher. ViewPager2now correctly populates theCollectionInfoandCollectionItemInfothat RecyclerView1.2.0-alpha02and higher no longer populate by default.- Added
FragmentTransactionCallbackinterface for listening to fragment lifecycle changes that happen insideFragmentStateAdapter. - Fixed
FragmentStateAdapterissue with initial fragment menu visibility when adding a fragment to theFragmentManager. - Fixed dispatch of window insets: all pages now get the same insets. Due to how
WindowInsetsare dispatched on old API versions (< API 30) that can prevent insets from being available to sibling views, you must opt into this fix viaWindowInsetsApplier.install(viewPager2)if you want to apply insets on < API 30 devices.
Wear Compose: v1.4.0-beta01
May 14, 2024
androidx.wear.compose:compose-*:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits.
The 1.4-beta01 release of Compose for Wear OS indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Compose 1.4 includes the following new functionality:
- We have added
Modifier.rotaryScrollable, a new modifier that connects rotary events with scrollable containers, allowing users to scroll via a crown or a rotating bezel on their Wear OS device. In addition,ScalingLazyColumnandPickernow support rotary input by default. Use therotaryScrollableBehaviorparameter to configure either scroll or snap behavior. For snap behavior, it is recommended to provide snap via theflingBehaviorparameter as well for touch scrolling. SwipeDismissableNavHostnow provides an entry animation for in-app transitions.PositionIndicatoris now shown by default when a screen is first displayed.SelectableChipandSplitSelectableChiphave been added as a variation onToggleChip- use this withRadioButtonin order to provide selectable semantics instead of toggleable semantics for accessibilityListHeadernow supports height adjustments when contents need extra height to accommodate large font sizes.
Bug Fixes
- We have fixed a bug where selectable chips announced double tap to toggle when already selected. (I7ed88)
Wear Compose Material3: v1.0.0-alpha23
May 14, 2024
androidx.wear.compose:compose-material3:1.0.0-alpha23 is released. Version 1.0.0-alpha23 contains these commits.
API Changes
- We have updated
ToggleButtonandRadioButtonAPIs such that disabled colors can be configured. (If13a7) - We have added a new
CircularProgressIndicatorfor Material3. (Ib3bd7)
Bug Fixes
- We have fixed a bug where selectable buttons announced double tap to toggle when already selected. (I7ed88)
wear protolayout: v1.2.0-alpha03
May 14, 2024
androidx.wear.protolayout:protolayout-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.
New Features
- Added API for setting custom weight values for
FontStyle. (I7390a)
Bug Fixes
- Fix the failure in
getTouchDelegateInfodue to empty target map. (I2accf)
Wear Tiles: v1.4.0-alpha03
May 14, 2024
androidx.wear.tiles:tiles-*:1.4.0-alpha03 is released. Version 1.4.0-alpha03 contains these commits.
Bug Fixes
TileService#getActiveTilesAsyncnow usesWearSdkAPI (when available) to provide a more accurate result. (I57bd8)
WindowManager: v1.3.0-rc01
May 14, 2024
WindowManager Jetpack 1.3 brings Kotlin Multiplatform support for WindowSizeClass features as well as multiple bug fixes.
androidx.window:window-*:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits.