2024-04-18
Activity: v1.9.0
April 17, 2024
androidx.activity:activity:1.9.0
, androidx.activity:activity-compose:1.9.0
, and androidx.activity:activity-ktx:1.9.0
are released. Version 1.9.0 contains these commits.
Important changes since 1.8.0
ComponentActivity
now implementsOnUserLeaveHintProvider
to allow components to callbacks foronUserLeaveHint
events.- The
OnBackPressedCallback
,BackHandler
, andPredictiveBackHandler
APIs now warn when callingonBackPressedDispatcher.onBackPressed()
when handling back as that will always break the Predictive Back Animation. See the best practices guide for more details. - The remainder of the Activity APIs have been rewritten in Kotlin and all extensions previously available in
activity-ktx
have been moved toactivity
.activity-ktx
is now completely empty.- As part of the conversion of
ActivityResultLauncher
to Kotlin, thegetContract
method is now an abstract Kotlin property. This is a binary compatible change, but source breaking if your implementation ofActivityResultLauncher
is written in Kotlin.
- As part of the conversion of
Annotation: v1.8.0-beta02
April 17, 2024
androidx.annotation:annotation-*:1.8.0-beta02
is released. Version 1.8.0-beta02 contains no changes since the prior release.
Benchmark: v1.2.4
April 17, 2024
androidx.benchmark:benchmark-*:1.2.4
is released. Version 1.2.4 contains these commits.
Bug Fixes
- Fixes baseline profile srcset not being set up in benchmark variants. Also fixes
automaticGenerationDuringBuild
in libraries causing a circular dependency. (I28ab7, b/333024280) - Use
am force-stop
to kill apps when not a system app like System UI or Launcher. This fixesStartupMode.COLD
benchmarks crashing from "Package $package must not be running prior to cold start!" due to process kill not fully succeeding. (I5e028)
Benchmark: v1.3.0-alpha03
April 17, 2024
androidx.benchmark:benchmark-*:1.3.0-alpha03
is released. Version 1.3.0-alpha03 contains these commits.
New Features
- Adds public API
PerfettoTraceProcessor.Session.queryMetrics
APIs with JSON, textproto, and proto binary (undecoded) variants. These allow you to query metrics built into TraceProcessor (I54d7f, b/304038382) - Added
profilerOutput
to JSON output for easier tooling around profiling traces (e.g. perfetto, method traces). (I05ddd, b/332604449) - Added power tag to benchmark Perfetto Config. This captures, for example, wakelock tracepoints. (Icfe44, b/286551983)
- Added inst argument
androidx.benchmark.profiling.skipWhenDurationRisksAnr
, can be set to false to avoid skipping method traces when expected duration may cause an ANR - strongly recommended to avoid in CI runs. - Added experimental inst argument
androidx.benchmark.profiling.perfCompare.enable
, set this to true to run comparison timing between measurement and profiling phases. Useful in e.g. evaluating overhead of method tracing. (I61fb4, b/329146942)
API Changes
- Changed
TraceSectionMetric.Mode
to sealed class to enable future expansion without breaking exhaustive when statements (I71f7b) - Added
TraceSectionMetric.Mode.Average
and.Count
, and reordered args so the more common argument (mode) was earlier in the arg list, reducing need for specifying parameter names. (Ibf0b0, b/315830077, b/322167531) - Renamed
Metric.getResult
togetMeasurements
to match return type (I42595)
Bug Fixes
- Fix to ensure benchmarks use generated baseline profiles when
automaticGenerationDuringBuild
is off (Ic144f, b/333024280) - Fix
BaselineProfile
gradle plugin property overrides to enable baseline profile generation and benchmarking when customizing anonMinified
or benchmark build type. (Ib8f05, b/324837887) - Fixed method traces flush in macrobenchmark, so that method traces should be fully captured and valid, even on slower devices. (I6349a, b/329904950)
- Enable blocking start on Perfetto trace record to reduce risk of missing data at beginning of trace. Only supported on API 33+. (Ie6e41, b/310760059)
- Added a warning when Android Test Orchestrator is used in benchmark modules, as this will cause per-module output JSON files to be repeatedly overwritten. (Ia1af6, b/286899049)
- Force ',' (comma) thousands separators for consistency in Studio output, ignoring device locale (I3e921, b/313496656)
TraceSectionMetric
now supports slices created usingTrace.{begin|end}AsyncSection
. (I91b32, b/300434906)- Added log.w / exception labels to all startup detection failures. This does not change current behavior (so some errors throw, and others silently fail to detect the startup), just makes it more understandable. Generally the ones that
Log.w()
and fail to report startup metrics are those where non-frame events are missing, exceptions are thrown when startup is detected except for frame timing information (from UI/RT slices). (Id240f, b/329145809) - Cancel background dexopt jobs before running a Macrobenchmark to reduce interference. (I989ed)
- Added
frameCount
measurement toFrameTimingMetric
to aid in discovery of scenarios where measurements change because the number of frames produced changed (new animations added, invalidation issues fixed). (I1e5aa) - Clarified that
frameOverrunMs
is the preferred metric for tracking when available in docs, and why. (I18749, b/329478323)
CameraX: v1.3.3
April 17, 2024
androidx.camera:camera-*:1.3.3
is released. Version 1.3.3 contains these commits.
Bug Fixes
- Fixed
ImageAnalysis
' resolution selection issue related to the analyzer default target resolution setting: target resolution was incorrectly kept as 640x480 even if applications has set a different analyzer default resolution setting. If applications encounter this issue (1.3.0 ~ 1.3.2) and can't upgrade to use the newer version releases which contain the solution, directly setting aResolutionSelector
with the preferred resolution and a matchingAspectRatioStrategy
to theImageAnalysis
UseCase can workaround this issue. (I81f72, b/330091012)
CameraX: v1.4.0-alpha05
April 17, 2024
androidx.camera:camera-*:1.4.0-alpha05
is released. Version 1.4.0-alpha05 contains these commits.
New Features
- Converted
ProcessCameraProvider
into Kotlin implementation. (I46d4f) - Added
ImageCapture.takePicture
suspend functions to allow it to be called in a Kotlin-idiomatic way. (I920be)
API Changes
- Add output format APIs to
ImageCapture
, and addgetSupportedOutputFormats
method toImageCaptureCapabilities
for querying device capability. The default output format value isOUTPUT_FORMAT_JPEG
, which captures SDR images in JPEG format. When the device supports Ultra HDR and the output format is set toOUTPUT_FORMAT_JPEG_ULTRA_HDR
, CameraX will capture Ultra HDR compressed images using the JPEG/R image format. The format is backwards compatible with SDR JPEG format and supports HDR rendering of content. This means that on older apps or devices, images appear seamlessly as regular JPEG; on apps and devices that have been updated to fully support the format, images appear as HDR. (I5de50) - Add
PhysicalCameraInfo
inCameraInfo
to query physical camera information and add physical camera id setter/getter inCameraSelector
(Ic5b90) - Replace
CameraController#COORDINATE_SYSTEM_VIEW_REFERENCED
withImageAnalysis#COORDINATE_SYSTEM_VIEW_REFERENCED
. The value of the constant remains the same. This is for consolidating all the constants into one place. (I890bb) - New
RetryPolicy
API empowers developers to customize retry behavior for CameraX initialization. (I36dd2) - Enable creation of
ImageCaptureLatencyEstimate
object to assist with testability (Iaba99) - Add a
ImageAnalysis#COORDINATE_SYSTEM_SENSOR
. When this is used, theMlKitAnalyzer
returns coordinates in the camera sensor coordinate system. (I3ec61) - Exposed extensions metadata API. New
CameraExtensionsInfo
andCameraExtensionsControl
interfaces allow applications to monitor and adjust extension strength settings. Applications can obtain theCameraExtensionsInfo
orCameraExtensionsControl
instance via the newly addedExtensionsManager#getCameraExtensionsInfo()
orExtensionsManager#getCameraExtensionsControl()
methods. (I28e1a) - Added
ProcessCameraProvider.awaitInstance
which is a suspending version ofProcessCameraProvider.getInstance
(Ib22b9) - Add a
PreviewView#getSensorToViewTransform()
API. The Matrix represents the transformation from camera sensor coordinates to thePreviewView
's coordinates. This can be used to transform coordinates from oneUseCase
to another. For example, transforming the coordinates of detected objects inImageAnalysis
toPreviewView
overlay. (I947ab) - Make
camera-viewfinder-core
API more generic so it can be used bycamera-viewfinder
andcamera-viewfinder-compose
. (I1e295) - Add
getSurface
function toViewfinderSurfaceRequest
. (I781a0) - Use
camera-viewfinder-core
incamera-viewfinder
and deprecateViewfinderSurfaceRequest
andCameraViewfinder
. (I6198c) - Added
ZoomGestureDetector
that interprets scaling gestures specifically configured for pinch-to-zoom activity. (Ifafbf)
Bug Fixes
- Fixed
ImageAnalysis
' resolution selection issue related to the analyzer default target resolution setting: target resolution was incorrectly kept as 640x480 even if applications has set a different analyzer default resolution setting. If applications encounter this issue (1.3.0 ~ 1.3.2) and can't upgrade to use the newer version releases which contain the solution, directly setting aResolutionSelector
with the preferred resolution and a matchingAspectRatioStrategy
to theImageAnalysis
UseCase
can workaround this issue. (I81f72, b/330091012) - Fixed an issue that queued
takePicture
request might fail to run if the current request is failed. (Ie0801) - Make the invalid JPEG data check applied to Vivo X60 and X60 Pro devices. This can fix abnormally large image issue on these devices. (I82247, b/288828159)
- Fixed the incorrect JPEG image metadata issue on Samsung A24 devices. With the fix, CameraX can successfully save the JPEG image, or correct Bitmap objects can be returned when calling the
ImageProxy.toBitmap()
function on Samsung A24 devices. (I8d6eb, b/309005680) - Make the invalid JPEG data check applied to all Samsung devices if the captured image is larger than 10 MB. This can fix abnormally large iamge issue on Samsung devices. (Ic2a65, b/288828159)
- Removed
ImageAnalysis
support on CameraX Extensions as many OEMs' Extensions implementations don't work withImageAnalysis
well and might cause inconsistent issues. (I2d926)
Car App: v1.7.0-alpha02
April 17, 2024
androidx.car.app:app-*:1.7.0-alpha02
is released. Version 1.7.0-alpha02 contains these commits.
New Features
- Added deprecated flags for map-based templates which
MapWithContent
template will power moving forward.
API Changes
- Deprecate old
MapTemplate
,RoutePreviewNavigationTemplate
,PlaceListNavigationTemplate
and encourage use of newMapWithContentTemplate
(Ib0a08)
Compose Animation: v1.6.6
April 17, 2024
androidx.compose.animation:animation-*:1.6.6
is released. No changes since the previous release
Compose Animation: v1.7.0-alpha07
April 17, 2024
androidx.compose.animation:animation-*:1.7.0-alpha07
is released. Version 1.7.0-alpha07 contains these commits.
New Features
- 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
andscaleOutSharedContentToBounds
to scale content insharedBounds
(I731c1)
API Changes
AnimatedVisibilityScope.transition
is now a stable API.Modifier.animateEnterExit(..)
has also been made stable. (I6c1d1)ApproachLayoutModifierNode
andModifier.approachLayout
are now stable, with newisMeasurementApproachInProgress()
andisPlacementApproachInProgress()
to replace the oldisMeasurementApproachComplete()
andisPlacementApproachComplete()
respectively.- Removed deprecated
intermediateLayout
modifier. (I3e91c) - You may now pass a
periodicBias
value (Float) tokeyframesWithSpline
, 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)
Bug Fixes
- Fixed over-shooting and under-shooting easing curves that would previously be clamped to 0..1 (I38747)
Compose Compiler: v1.5.12
April 17, 2024
androidx.compose.compiler:compiler:1.5.12
and androidx.compose.compiler:compiler-hosted:1.5.12
are released. Version 1.5.12 contains these commits.
Bug Fixes
- Fixes an issue with incremental compilation with Kotlin 1.9.23. (Ifca55)
- Fix non-nullable types in value parameters for non-primitive inline classes. (Ie6bb5)
Compose Foundation: v1.6.6
April 17, 2024
androidx.compose.foundation:foundation-*:1.6.6
is released. Version 1.6.6 contains these commits.
Bug Fixes
- Fixed a bug where in certain conditions toggling
enabled
orreadOnly
attributes ofTextField
would cause a crash. (Iae17b)
Compose Foundation: v1.7.0-alpha07
April 17, 2024
androidx.compose.foundation:foundation-*:1.7.0-alpha07
is released. Version 1.7.0-alpha07 contains these commits.
New Features
- Added a
TextDefaults
object that contains methods to construct aLinkAnnotation
and parse HTML-tagged string which applyMaterialTheme
to the links. (I98532, b/139312671) - Item appearance and disappearance animation support was added into
LazyVerticalGrid
andLazyHorizontalGrid
. Previously it was possible to addModifier.animateItemPlacement()
modifier in order to support placement (reordering) animations. We deprecated this modifier and introduced a new non-experimental modifier calledModifier.animateItem()
which allows you to support all three animation types: appearance (fade in), disappearance (fade out) and reordering. (Ib7d12, b/330510929) - Item appearance and disappearance animation support was added into
LazyVerticalStaggeredGrid
andLazyHorizontalStaggeredGrid
. Previously it was possible to addModifier.animateItemPlacement()
modifier in order to support placement (reordering) animations. We deprecated this modifier and introduced a new non-experimental modifier calledModifier.animateItem()
which allows you to support all three animation types: appearance (fade in), disappearance (fade out) and reordering. (I69bc9, b/330511290)
API Changes
- Adds
ContextMenuColors
and the associatedLocalContextMenuTheme
ProvidableCompositionLocal
. The colors of the context menu on text fields and selectable text can be modified by providing the composition local. (Ifa154) - Text links got pressed state styling option in addition to normal styling, hovered and focused. (I5f864, b/139312671)
- Introduce
ViewConfiguration.HandwritingGestureLineMargin
for handwriting gestures. Support handwriting gesture forBasicTextField
. (Ie6e13, b/325660505) - Removed
DelegatableNode.scrollIntoView
for the 1.7 release since we didn't have time to finish stabilizing the rest of the related API surface. This function will be re-introduced in 1.8 (I6cf61, b/333421581, b/332900232) - When querying Layout coordinates, you may now use the
excludeDirectManipulationOffset
argument to exclude the offset set by parent Layouts that placed their children usingPlaceable.PlacementScope.withDirectManipulationPlacement
. Likewise, a Layout that changes the position of its children frequently may now place them usingwithDirectManipulationPlacement
(such as Scroll, implemented by default). This helpsapproachLayout
based animations to be more intuitive, having now the opportunity to differentiate what offset to animate, and what to apply directly when deciding to animate their approach. (I60ec7) - Introduce
requestScrollToItem
forLazyStaggeredGrid
. For each measure-pass, the client may now opt-out of maintaining index based on the key by callingrequestScrollToItem
. This does not change existing behavior in any way unlessrequestScrollToItem
is called. (I63983) - Introduce
requestScrollToPage
in Pager. For each measure-pass, the client may now opt-out of maintaining index based on the key by callingrequestScrollToPage
. This does not change existing behavior in any way unlessrequestScrollToPage
is called. (Ic4213) - Introduced
requestScrollToItem
forLazyGrids
. For each measure-pass, the client may now opt-out of maintaining index based on the key by callingrequestScrollToItem
. This does not change existing behavior in any way unlessrequestScrollToItem
is called. (I0a7a0) ClickableText
is marked as deprecated. To add links to the text, create anAnnotatedString
with aLinkAnnotation
corresponding to your link and pass thisAnnotatedString
to theText
composable (I34d4b, b/323346994)UrlAnnotation
is deprecated, useLinkAnnotation.Url
instead. If you're using Material theming, then useTextDefaults
object to create the annotation with Material theming applied to it (I8d180, b/323346545)String.parseAsHtml
renamed toAnnotatedString.Companion.fromHtml
(I43dcd)- Added styling arguments (
linkStyle
,focusedLinkStyle
,hoveredLinkStyle
) and a link interaction listener to theparseAsHtml
method. When parsing the HTML-tagged string with<a>
tags, the method will construct aLinkAnnotation.Url
for each such tag and pass the styling objects and link interaction listener to each annotation. (I7c977) LinkAnnotation
now takes the state-based styling arguments and aLinkInteractionListener
. Add this annotation to theAnnotatedString
to get a hyperlink. By passingfocusedState
and/orhoveredState
you can define the visual configuration for links when they are focused and/or hovered. (I81ce4, b/139312671)- The feature flag for long screenshots has been removed. (I28648, b/329128246)
LazyColumn
will now render sticky headers correctly in long screenshots. (I8d239, b/329296635)- Stabilized majority of the remaining experimental APIs that were introduced with the new
BasicTextField
. (I714e2) - Added
textObfuscationCharacter
parameter toBasicSecureTextField
that controls which character to use while obfuscating the contents. (I0588b) NestedScroll
sources Drag and Fling are being replaced byUserInput
andSideEffect
to accommodate for the extended definition of these sources that now include animations (Side Effect) and Mouse Wheel and Keyboard (UserInput
). (I40579)- Introduce
LocalBringIntoViewSpec
, a platform dependent focus scrolling behavior that is applied at the Scrollable modifier layer. (I27aa5, b/317453911) - Removed
TextFieldCharSequence
.TextFieldBuffer.originalValues
is replaced withTextFieldBuffer.originalText
andTextFieldBuffer.originalSelection
. (I2c7d6) ImeOptions.hintLocales
is no longer nullable. If you want to pass an empty Locale list, please useLocaleList.Empty
. (Ic5bc4)- Renamed
getOffsetFractionForPage
togetOffsetDistanceInPages
. (Ia05e2)
Bug Fixes
- When
InputTransformations
are joined withnext
, theirKeyboardOptions
are now properly merged by individual options using the newKeyboardOptions.merge
method. (Ie5304, b/295951492) AnchoredDraggableState
'stargetValue
now does not consider positional thresholds anymore. It now has an implicit threshold of 50%, meaning that thetargetValue
changes at the midpoint between two anchors. (I82c2c)
External Contribution
- Renamed 2 scroll APIs (I56a75)
Compose Material: v1.6.6
April 17, 2024
androidx.compose.material:material-*:1.6.6
is released. No changes since the last release.
Compose Material: v1.7.0-alpha07
April 17, 2024
androidx.compose.material:material-*:1.7.0-alpha07
is released. Version 1.7.0-alpha07 contains these commits.
API Changes
- Text links got pressed state styling option in addition to normal styling, hovered and focused. (I5f864, b/139312671)
- Added a
TextDefaults
object that contains methods to construct aLinkAnnotation
and parse HTML-tagged string which applyMaterialTheme
to the links. (I98532, b/139312671)
Compose Material3: v1.3.0-alpha05
April 17, 2024
androidx.compose.material3:material3-*:1.3.0-alpha05
is released. Version 1.3.0-alpha05 contains these commits.
New Features
SearchBar
andDockedSearchBar
have new overloads that take a text field parameter. This allows styling the text field separately from the rest of the search bar as well as passing in custom text fields. The text field of the current implementation has been made available asSearchBarDefaults.InputField
. (I50c73, b/275074248, b/278773336, b/326627700)- the lambda
drawTick
has been added to the public API in order to customize the ticks if needed (I0c048)
API Changes
- Text links got pressed state styling option in addition to normal styling, hovered and focused (I5f864, b/139312671)
- Updated
CarouselItemInfo
to expose a mask Rect that the item is being clipped by (I785d8) - Removed
BasicTooltipState
from the Material 3 public API. Its functionality is combined withTooltipState
until Foundation'sBasicTooltip
is stabilized. (Icda29) - Added a
TextDefaults
object that contains methods to construct aLinkAnnotation
and parse HTML-tagged string which applyMaterialTheme
to the links (I98532, b/139312671) ExposedDropdownMenuBoxScope
no longer permits subclasses. Exposed dropdown menus now have aMenuAnchorType
which should be passed tomenuAnchor
to support better a11y. This should be used instead of passingfocusable
toExposedDropdownMenu
, which is now deprecated.menuAnchor
has a new parameter to controlenabled
state. (I55ee6, b/257209915, b/308840226)- Fixed the border color of
OutlinedButton
when disabled. AddedButtonDefaults.outlinedButtonBorder("enabled")
overload that takes the enabled state. (Ie650b, b/318461363) - Added a new
CarouselItemInfo
class to help clients get information about the item sizes. (I9070c) ColorScheme
constructor without surface containers is now deprecated. Please migrate to the constructor that includes surface containers. (I35c11)- [Outlined]
TextFieldDefaults
ContainerBox
renamed toContainer
. (Ie8d3b)
Bug Fixes
BottomSheetScaffold
will no longer scroll from nested scroll ifsheetSwipeEnabled
is false. (I5e1c1, b/306464779)- Removed some
ExperimentalMaterial3Api
OptIn annotation inIconButtonSamples.kt
. (I111d1)
Compose Material3 Adaptive Navigation Suite: v1.0.0-alpha06
April 17, 2024
androidx.compose.material3:material3-adaptive-navigation-suite:1.0.0-alpha06
, androidx.compose.material3:material3-adaptive-navigation-suite-android:1.0.0-alpha06
, and androidx.compose.material3:material3-adaptive-navigation-suite-desktop:1.0.0-alpha06
are released. Version 1.0.0-alpha06 contains these commits.
API Changes
- Add
containerColor
andcontentColor
toNavigationSuiteScaffoldDefaults
. (I64e3a, b/331993720) - Adding
itemColors
function toNavigationSuiteDefaults
. (Idf719, b/328480012) - Make
NavigationSuiteScope
sealed. (Iefa57)
Compose Material3 Common: v1.0.0-alpha01
April 17, 2024
androidx.compose.material3:material3-common:1.0.0-alpha01
, androidx.compose.material3:material3-common-android:1.0.0-alpha01
, and androidx.compose.material3:material3-common-desktop:1.0.0-alpha01
are released. Version 1.0.0-alpha01 contains these commits.
New Features
Themeless components that can be used to build Material Design components:
- Tonal Palette
- Icon
- Touch target size
Compose Material3 Adaptive: v1.0.0-alpha11
April 17, 2024
androidx.compose.material3.adaptive:adaptive-*:1.0.0-alpha11
is released. Version 1.0.0-alpha11 contains these commits.
API Changes
- Make scope interfaces sealed. (Iefa57)
- Introduce
AnimatedPaneScope
. (I62d73, b/332750742) - Make
AdaptStrategy
sealed and stable. (Ia28b2) - Introduce a copy method of
PaneScaffoldDirective
. (I9291f) - Mark
ThreePaneScaffoldScope
as experimental. (I9d527) - Provide easy-to-use scaffold APIs that supports navigation. (I263f0, b/321010778)
Compose Runtime: v1.6.6
April 17, 2024
androidx.compose.runtime:runtime-*:1.6.6
is released. No changes since the last release.
Compose Runtime: v1.7.0-alpha07
April 17, 2024
androidx.compose.runtime:runtime-*:1.7.0-alpha07
is released. Version 1.7.0-alpha07 contains these commits.
New Features
- 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 usingprovidesComputed
instead ofprovides
. - 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 ofcurrent
which is only accessible in@Composable
functions. (Iadbc0)
API Changes
- 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 tomutableStateOf()
. The initial state ofmutableStateListOf()
andmutableStateMapOf()
is empty. - Added
Snapshot.isInSnapshot
andSnapshot.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)
Bug Fixes
- Fixed merging of
readObserver
in nested snapshots. This caused nested derived states to under-invalidate when used inside asnapshotFlow
. (Idf138)
Compose UI: v1.6.6
April 17, 2024
androidx.compose.ui:ui-*:1.6.6
is released. Version 1.6.6 contains these commits.
Bug Fixes
- Fixes a rare
BasicTextField
crash.
Compose UI: v1.7.0-alpha07
April 17, 2024
androidx.compose.ui:ui-*:1.7.0-alpha07
is released. Version 1.7.0-alpha07 contains these commits.
API Changes
ClickableText
is marked as deprecated. To add links to the text, create anAnnotatedString
with aLinkAnnotation
corresponding to your link and pass thisAnnotatedString
to the Text composable. (I34d4b, b/323346994)- Introduce
ViewConfiguration.HandwritingGestureLineMargin
for handwriting gestures. SupportJoinOrSplit
gesture forBasicTextField
(Ie6e13, b/325660505) FocusProperties.enter
andFocusProperties.exit
are no longer experimental.FocusDirection.Enter
andFocusDirection.Exit
are no longer experimental.FocusRequester.Cancel
is no longer experimental (I461a1, b/261564106)- When querying Layout coordinates, you may now use the
excludeDirectManipulationOffset
argument to exclude the offset set by parent Layouts that placed their children usingPlaceable.PlacementScope.withDirectManipulationPlacement
. Likewise, a Layout that changes the position of its children frequently may now place them usingwithDirectManipulationPlacement
(such as Scroll, implemented by default). This helpsapproachLayout
based animations to be more intuitive, having now the opportunity to differentiate what offset to animate, and what to apply directly when deciding to animate their approach. (I60ec7) - The feature flag for long screenshots has been removed. (I28648, b/329128246)
LazyColumn
will now render sticky headers correctly in long screenshots. (I8d239, b/329296635)NestedScroll
sources Drag and Fling are being replaced byUserInput
andSideEffect
to accommodate for the extended definition of these sources that now include animations (Side Effect) and Mouse Wheel and Keyboard (UserInput
). (I40579)ApproachLayoutModifierNode
andModifier.approachLayout
are now stable, with newisMeasurementApproachInProgress()
andisPlacementApproachInProgress()
to replace the oldisMeasurementApproachComplete()
andisPlacementApproachComplete()
respectively.- Removed deprecated
intermediateLayout
modifier. (I3e91c) - Rename
GraphicsLayer#buildLayer
to record to mirror the begin/endRecording methods of Displaylist backed APIs likeRenderNode
and Picture. - Updated
rememberGraphicsLayer
to leveragerememberObserver
. (I312c1, b/288494724, b/330758155) UrlAnnotation
is deprecated, useLinkAnnotation.Url
instead. If you're using Material theming, then useTextDefaults
object to create the annotation with Material theming applied to it (I8d180, b/323346545)- Text links got pressed state styling option in addition to normal styling, hovered and focused (I5f864, b/139312671)
String.parseAsHtml
renamed toAnnotatedString.Companion.fromHtml
. (I43dcd)- Added styling arguments (
linkStyle
,focusedLinkStyle
,hoveredLinkStyle
) and a link interaction listener to theparseAsHtml
method. When parsing the HTML-tagged string with<a>
tags, the method will construct aLinkAnnotation.Url
for each such tag and pass the styling objects and link interaction listener to each annotation. (I7c977) LinkAnnotation
now takes the state-based styling arguments and aLinkInteractionListener
. Add this annotation to theAnnotatedString
to get a hyperlink. By passingfocusedState
and/orhoveredState
you can define the visualconfiguration
for links when they are focused and/or hovered. (I81ce4, b/139312671)ImeOptions.hintLocales
is no longer nullable. If you want to pass an empty Locale list, please useLocaleList.Empty
. (Ic5bc4)
Bug Fixes
- Gracefully handles bad/corrupt historical input event data (ignores bad offset data).
- Fixes unexpected pointer events when a pointer input modifier is added dynamically before another pointer input modifier during an active pointer input event stream (for example, between a hover enter and hover exit [mouse/stylus]).
Core and Core-ktx: v1.13.0
April 17, 2024
androidx.core:core:1.13.0
, androidx.core:core-ktx:1.13.0
, and androidx.core:core-testing:1.13.0
are released. Version 1.13.0 contains these commits.
Important changes since 1.12.0
- The library’s
minSdkVersion
has been raised to19
. Many compatibility APIs have been marked deprecated since they were only needed prior to API level 19. - Several classes have been rewritten in Kotlin to provide better interoperability with Kotlin consumers while preserving Java compatibility.
- Removed
FingerprintManagerCompat
, which is a no-op starting in Android V and should not be used on earlier platforms. Clients should migrate toBiometricPrompt
immediately. - Added
PathParser
, which can create a Path instance from SVG path strings.
Core Remote Views: v1.1.0-beta02
April 17, 2024
androidx.core:core-remoteviews:1.1.0-beta02
is released. No major changes since the last release.
Core Splashscreen: v1.2.0-alpha01
April 17, 2024
androidx.core:core-splashscreen:1.2.0-alpha01
is released. Version 1.2.0-alpha01 contains these commits.
Bug Fixes
- Change the cutout mode of
Base.Theme.SplashScreen
to always since v30.(Idfc3f) - Reset
enforceNavigationBarContrast
to system default value from API 31, so the splash screen theme won't corrupt activity's theme. From API 31+, the splash screen isn't create asPhoneWindow
, so it's unnecessary to inherit the value from API 29. Also remove the override action fromapplyAppSystemUiTheme
, sinceenforceNavigationBarContrast
could already changed from app side during launch, override it from attribute doesn't make sense.(Ic2cd9) - Set default light navigation bar which respects day/night theme. So for API 33+ platform, the splash screen theme won't cause flicker while removing the splash screen. (I8023a)
- Do not overwrite activity theme after receiving the splash screen view from api 33.(I10587b)
Core-telecom: v1.0.0-alpha03
April 17, 2024
androidx.core:core-telecom:1.0.0-alpha03
is released. Version 1.0.0-alpha03 contains these commits.
Bug Fixes
- Refactor of
JetpackConnectionService
to correct an issue which occurs on SDK 33 and below when the address passed in is empty. The refactoredJetpackConnectionService
is also resilient to unexpected NULL values from Telecom platform APIs. - Improvements to
addCall/CallControlScope
API documentation. - Test reliability improvements.
credentials: v1.3.0-alpha03
April 17, 2024
androidx.credentials:credentials:1.3.0-alpha03
and androidx.credentials:credentials-play-services-auth:1.3.0-alpha03
are released. This version contains source jars that were missing from the previous release.
Credentials e2ee: v1.0.0-alpha02
April 17, 2024
androidx.credentials:credentials-e2ee:1.0.0-alpha02
is released. This version contains source jars that were missing from the previous release.
DataStore: v1.1.0
April 17, 2024
androidx.datastore:datastore-*:1.1.0
is released. Version 1.1.0 contains these commits.
Major changes since 1.0.0 release
Please review the release notes from alpha and beta versions of 1.1.0 for more info. Some of the major updates in 1.1.0 are:
- DataStore now supports multiple processes accessing the same file, with support for observability across processes.
- The new Storage interface allows you to customize how to store or serialize your data models.
- You can now use DataStore in Kotlin Multiplatform projects.
Fragment: v1.7.0-rc02
April 17, 2024
androidx.fragment:fragment-*:1.7.0-rc02
is released. Version 1.7.0-rc02 contains these commits.
Bug Fixes
- Added logs to indicate why setting a
sharedElement
without any other transitions will fail to run. (Iec48e) - Fixed a bug where if a non-seekable shared element was added to a transactions where all other transitions were seekable, there would be a crash. Now the transaction will correctly be considered non-seekable. (I18ccd)
Fragment: v1.8.0-alpha02
April 17, 2024
androidx.fragment:fragment-*:1.8.0-alpha02
is released. Version 1.8.0-alpha02 contains these commits.
Bug Fixes
- From Fragment
1.7.0-rc02
: Added logs to indicate why setting asharedElement
without any other transitions will fail to run. (Iec48e) - From Fragment
1.7.0-rc02
: Fixed a bug where if a non-seekable shared element was added to a transactions where all other transitions were seekable, there would be a crash. Now the transaction will correctly be considered non-seekable. (I18ccd)
Games-Activity: v3.0.3
April 17, 2024
androidx.games:games-activity:3.0.3
and androidx.games:games-text-input:3.0.3
are released. Version 3.0.3 contains these commits.
Bug Fixes
- Fixed compatibility issues with some software keyboards.
Glance: v1.1.0-beta02
April 17, 2024
androidx.glance:glance-*:1.1.0-beta02
is released. This version contains source jars that were missing from the previous release.
Graphics Core: v1.0.0-rc01
April 17, 2024
androidx.graphics:graphics-core:1.0.0-rc01
is released. This version is developed in an internal branch.
Bug Fixes
- Fixed issue leading to potential double closure of file descriptors with the
CanvasBufferedRendererAPI
with certain Android devices running Android 14. - Fixed issue where
FrameBuffer
would not properly delete framebuffer instances.
Lifecycle: v2.8.0-beta01
April 17, 2024
androidx.lifecycle:lifecycle-*:2.8.0-beta01
is released. Version 2.8.0-beta01 contains these commits.
New Features
- The
lifecycle-runtime-compose
artifact is now compatible with Kotlin Multiplatform, moving its code tocommon
and ships an Android artifact, matching the multiplatform support forandroidx.compose
. (If7a71, I4f4a0, b/331769623)
Navigation: v2.8.0-alpha07
April 17, 2024
androidx.navigation:navigation-*:2.8.0-alpha07
is released. Version 2.8.0-alpha07 contains these commits.
New Features
Adds a new
navigation-fragment-compose
artifact that includes aComposableNavHostFragment
alternative toNavHostFragment
that allows you to addcomposable
destinations to your Navigation XML files. Eachcomposable
destination must be expressed as a top-level, no argument@Composable
method whose fully qualified name is used as theandroid:name
attribute on each destination. When navigating to one of these destinations, a containing fragment is created to display the composable content. (I0ef2e, b/265480755)// 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" />
API Changes
- Support for Safe Args in Navigation Compose using an approach based on Kotlin Serialization continued. These APIs are not finished and are marked with the
ExperimentalSafeArgsApi
annotation. This annotation will be removed when the entire API surface is complete in a future release. (Iefd95, I409c8, I5b5ac, I7e753, I960f8, I3eabd, I8ed5a, Ied2c9, I9b73c, I554db, Ib3aba, Ia668d, b/188693139)
privacysandbox ads: v1.1.0-beta06
April 17, 2024
androidx.privacysandbox.ads:ads-adservices:1.1.0-beta06
and androidx.privacysandbox.ads:ads-adservices-java:1.1.0-beta06
are released. Version 1.1.0-beta06 contains these commits.
Note
- As of privacysandbox-ads jetpack release 1.1.0-beta06, all flags-enabled Android R devices will be able to access the PPAPIs. For any use case that should not support Android R, additional guards will be required within the code using privacysandbox-ads jetpack code.
New Features
- Backward compatibility support for Android R.
Transition: v1.5.0-rc02
April 17, 2024
androidx.transition:transition:1.5.0-rc02
and androidx.transition:transition-ktx:1.5.0-rc02
are released. Version 1.5.0-rc02 contains these commits.
Dependency Update
- Updated Fragment dependency to version 1.7.0-rc02 which fixed a bug where if a non-seekable shared element was added to a transaction where all other transitions were seekable, there would be a crash.
Wear Compose: v1.4.0-alpha07
April 17, 2024
androidx.wear.compose:compose-*:1.4.0-alpha07
is released. Version 1.4.0-alpha07 contains these commits.
API Changes
- We have added
Modifier.rotary
, 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,ScalingLazyColumn
and Picker now support rotary input by default, with new overloads that include therotaryBehavior
parameter for specifying the configuration of either scroll or snap. If therotaryBehavior
parameter is set to snap, then it is recommended to provide snap via theflingBehavior
parameter as well, for touch scrolling. (I2ef6f) NestedScroll
sources Drag and Fling are being replaced byUserInput
andSideEffect
to accommodate for the extended definition of these sources that now include animations (Side Effect) and Mouse Wheel and Keyboard (UserInput). (I40579)- We have added
SelectableChip
andSplitSelectableChip
to make the distinction clearer between toggle controls such asSwitch/Checkbox
and selectable controls such asRadioButton
. This replaces the previously added overloads ofToggleChip/SplitToggleChip
withselectionControl
parameters. (Ia0217) - Updated visibility modifier of
IndeterminateStrokeWidth
inProgressIndicatorDefaults
to public. (I5b5a4)
Wear Compose Material3: v1.0.0-alpha21
April 17, 2024
androidx.wear.compose:compose-material3:1.0.0-alpha21
is released. Version 1.0.0-alpha21 contains these commits.
- This release was triggered due to a technical issue in the previous release that resulted in missing source jars. There are no new commits in this release.
Wear Watchface: v1.3.0-alpha03
April 17, 2024
androidx.wear.watchface:watchface-*:1.3.0-alpha03
is released. Version 1.3.0-alpha03 contains these commits.
API Changes
- We've added
EditorSession#setOverrideComplications
which temporarily sets the underlying watchface instance'sComplicationData
while editing. If complications change infrequently, this is more efficient than passing overrides in viaEditorSession#renderWatchFaceToBitmap
. (I19384)
Bug Fixes
- Previously
selectComplicationDataForInstant
was callingtoApiComplicationData
for any timelines, meaning the subsequent === reference equality test would always fail. This meant complications were getting reloaded every frame leading to battery drain. (717406)
Webkit: v1.12.0-alpha01
April 17, 2024
androidx.webkit:webkit:1.12.0-alpha01
is released. Version 1.12.0-alpha01 contains these commits.
API Changes
- Added a new API to enable Web Authentication in
WebView. Developers
can enable/disableWebAuthn
calls in aWebView
for their apps usingWebSettingsCompat#setWebAuthenticationSupport
. (I8187f)
WorkManager: v2.10.0-alpha02
April 17, 2024
androidx.work:work-*:2.10.0-alpha02
is released. Version 2.10.0-alpha02 contains these commits.
API Changes
- Added the ability to emit trace spans via a configurable
@RestrictTo
Tracer
inWorkManager
. (I17d7f, b/260214125) Configuration.workerCoroutineContext
was added to for control of dispatcher whereCoroutineWorker
is executed. It helps to completely avoid usage ofDispatchers.Default
inWorkManager
. (Icd1b7)- Add custom exception handlers for Workers (Ib1b74, b/261190695)
OneTimeWorkRequest.Builder
andPeriodicWorkRequest.Builder
can now be constructed withKClass
instead ofClass
:val request = OneTimeWorkRequest.Builder(Worker::class).setConstraints(...).build()
(Ib55f6)WorkManager
class was migrated to Kotlin. Now methods that returnLiveData
,ListenableFuture
orFlow
provides correct nullability information. It could require changes in clients' source code, if nullability assumptions in that code were incorrect. (If6757)