Skip to content

2023-05-24

Choose a tag to compare

@github-actions github-actions released this 24 May 18:36
· 145 commits to main since this release

Activity: v1.7.2

May 24, 2023

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

Bug Fixes

  • Fix ReportDrawn crashing when navigating away from a screen before report is called. (Ic46f1, b/260506820)

AppSearch: v1.1.0-alpha03

May 24, 2023

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

API Changes

  • Removed methods that return ListenableFuture and don't have Async suffix. (I0515f)
  • Adds the ability to configure projections by a Document class. (I94576)
  • Adds getters/setters for Features#NUMERIC_SEARCH, Features#VERBATIM_SEARCH and Features#LIST_FILTER_QUERY_LANGUAGE. Also adds Features#LIST_FILTER_QUERY_LANGUAGE. (Ic7204)
  • Adds @RequiresFeature to JoinSpec. (Ic126c)
  • Add LongPropertyConfig indexing type into AppSearch compiler. (Iee948)
  • Add Features#VERBATIM_SEARCH (I47bc0)
  • Added JoinableConfig (I47552)
  • Added utility methods for linking documents and creating qualified ids. (I33ec6)
  • Expose the Advanced Scoring API from Icing (I02d48)
  • Added the joinspec API (Iaecfa)
  • Unhide SearchSuggestionAPI in AppSearchSession. (I9029b)
  • This change adds an api to allow clients to specify property weights to control how matches to query terms in different properties affects the scored produced by RANKING_STRATEGY_RELEVANCE_SCORING. (I069b9)
  • Add LongPropertyConfig indexing API. (Ie0fb5)
  • Added RFC822_TOKENIZATION as a tokenizer type (I8a390)
  • Updated APIs for ImageObject to be a bit more idiomatic. (If8cd5)
  • Added new Document type ImageObject modeled after http://schema.org/ImageObject. (I6a0c0)
  • Add fields from Thing to Alarm, AlarmInstance, Timer, Stopwatch, StopwatchLap, ContactPoint, and Person (Id876c)
  • Add Person and ContactPoint for querying Person corpus in AppSearch. (Ia58f9)
  • Adds LocalStorage.createGlobalSearchSession API to search across all databases within the local storage of a single app. (Id3c89)

Bug Fixes

  • Add integer numeric search e2e unit test (I20f7d)
  • Fix javadoc link and comment (I34a9d)
  • Fully support Android 13 features in appsearch-platform-storage (Ia8e61)

Autofill: v1.3.0-alpha01

May 24, 2023

androidx.autofill:autofill:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • Adds autofill hint constants for wallet valuables types. (Ie5d9d)

CameraX: v1.2.3

May 24, 2023

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

Bug Fixes

  • Fixed an issue where VideoCapture could not work with the front camera on some devices. For example, on Samsung Galaxy S23 and Xiaomi 2107113SG. (Ibec7e, b/270656244)

CameraX: v1.3.0-alpha07

May 24, 2023

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

New Features

  • The new VideoCapture.Builder# setTargetFrameRate(Range) API allows video recordings to be captured at other frame rates besides the device default. The available frame rates for recordings can be queried through the new CameraInfo#getSupportedFrameRates() API.

API Changes

  • Renamed ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF/ON constants to ALLOWED_RESOLUTIONS_NORMAL/SLOW and renamed the builder setHighResolutionEnabledFlag function name to setAllowedResolutionMode. (Iae817)
  • CameraInfo#getSupportedFrameRateRanges() now returns a Set rather than a List to better represent that the ranges are unordered. (I02f43)
  • Add an error listener to CameraEffect to handle unrecoverable errors (Ice471)
  • Add public constructor in ResolutionInfo for better testability (If6d1c)
  • Provided an API UseCase.snapToSurfaceRotation(int) to replace usage of setTargetRotationDegrees and deprecate API ImageAnalysis.setTargetRotationDegrees(int), ImageCapture.setTargetRotationDegrees(int) and VideoCapture.setTargetRotationDegrees(int). (Ia9010)
  • Added new API Preview#getTargetFrameRate and Preview.Builder#setTargetFrameRate to be able to set and retrieve target frame rate for Preview use case (If4f22)
  • VideoRecordEvent.Finalize will now complete with error code ERROR_RECORDING_GARBAGE_COLLECTED when the Recording object is stopped due to garbage collection. (Iba974)

Bug Fixes

  • Fixed NullPointerException when the cached output sizes in StreamConfigurationMapCompat are null. (Idf124, b/282025204)
  • Fixed the issue that Preview.setSurfaceProvider(null) doesn't pause the preview in Extensions (Ia903e)
  • Fixed an issue where ConcurrentModificationException is thrown during camera opening when VideoCapture is bound. (Ic8ac4)

Compose Animation: v1.5.0-beta01

May 24, 2023

androidx.compose.animation:animation-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Removed allocations in recomposition, color animations, and AndroidComposeView (Ib2bfa)

Bug Fixes

  • Removed allocations from spring animations (Ie9431)

Compose Foundation: v1.5.0-beta01

May 24, 2023

androidx.compose.foundation:foundation-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Implement PlatformDataProvider to provide heart rate and daily steps. SensorGateway interface is removed from the public API. (I55b84)

Bug Fixes

  • Reduce allocations during lazy list/grids/etc. measurements (Iaf9e2)
  • Reduced allocations when applying snapshots (I65c09)
  • Removed allocations from spring animations (Ie9431)
  • Removed allocation from TextLayout (I0fd11)
  • Removed multiple allocations in pointer velocity tracking (I26bae)

Compose Material: v1.5.0-beta01

May 24, 2023

androidx.compose.material:material-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • DrawerState's and BottomDrawerState's offset are not nullable anymore. They instead return Float.NaN to indicate the absence of the offset. (Ie9855)
  • Added an option to pass in a ScrollState when constructing a DropdownMenu or an ExposedDropdownMenu for controlling the vertical scroll state of the displayed menu items. (Idb009, b/185304441)
  • Add the support for enabling/disabling the gesture of ModalBottomSheetLayout so that user could configure this for more featured bottomsheet (I40af0)
  • Added a color parameter to BasicText to allow efficiently animating or setting text color. (Iffd88, b/246961787)
  • Renaming the Semantics property isContainer to isTraversalGroup (I121f6)

Bug Fixes

  • Fixed the AlertDialog dismiss action to appear below the confirm action when the actions stacked over each other to fit into the dialog's width. This fix align the implementation with the Material Design spec. (I029de, b/235454277)

Compose Material 3: v1.2.0-alpha02

May 24, 2023

androidx.compose.material3:material3-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.

API Changes

  • Add window insets parameter to ModalBottomSheet.
    • Scrim for ModalBottomSheet may now be drawn behind status bar with windowInsets set to zero
    • Updated default ModalBottomSheet functionality to stay outside of system bars including navigation
    • Status bar inset handling is provided by drag handle in edge-to-edge mode.
    • BottomSheetDefaults includes window insets for BottomSheetWindow. (I31200, b/274872542, b/272973615, b/272334475, b/268432129, b/275849044, b/275486106, b/268433162)
  • Deprecate Indicator and add Primary/SecondaryIndicator to match the M3 specs. PrimaryIndicator matches the width of the tab's content whereas SecondaryIndicator spans the full available width. SecondaryIndicator is equivalent to the now deprecated Indicator and can be a direct replacement. (I27604)
  • Added an option to pass in a ScrollState when constructing a DropdownMenu or an ExposedDropdownMenu for controlling the vertical scroll state of the displayed menu items. (Ia0734, b/185304441)
  • Added an overload for Slider that is a stateful version of the component. Created SliderState that holds all of the information for the current active track, the measurements of the components of the Slider, and the drag and gesture logic. (I124a5)
  • Renaming the Semantics property isContainer to isTraversalGroup (I121f6)
  • Added optimized TextStyle.merge(...) with full parameter list. (Iad234, b/246961787)
  • Made TooltipState, RichTooltipState, and PlainTooltipState public interfaces. Added RichTooltipStateImpl and PlainTooltipStateImpl for default states. Added remember*State functions to obtain these implemented states. Removed TooltipSync in favor of an TooltipDefault.GlobalMutatorMutex. (I7813d)
  • Updated the DatePickerColors to include additional customization options for the date picker divider, navigation, and text input fields colors. (I1a685, b/274626815)
  • DatePickerState and the DateRangePickerState are now public interfaces with default implementations that can be retrieved by the rememberDatePickerState and rememberDateRangePickerState. (I71c52)
  • Removed the dateValidator from DatePicker and DateRangePicker and introduced a SelectableDates interface that can be set on the state to control which dates or years are selectable in the UI. (Ic2fc6)
  • TimePicker removed from stable API, further changes are expected in the state API (I3f39a)
  • ModalBottomSheet moved to android only. ModalBottomSheet is not recommended for desktop use, and the functionality is not actively maintained. (Ib3778)

Bug Fixes

  • Fixed the AlertDialog dismiss action to appear below the confirm action when the actions stacked over each other to fit into the dialog's width. This fix aligns the implementation with the Material Design spec. (I029de, b/235454277)
  • Fixed bug in ListItem using incorrect padding for three-line items. (I6e235)
  • ModalBottomSheet now can display IME keyboard (Idc508, b/262140644, b/268380384, b/272483584)

Compose Runtime: v1.5.0-beta01

May 24, 2023

androidx.compose.runtime:runtime-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Removed allocations in recomposition, color animations, and AndroidComposeView (Ib2bfa)
  • Added a @StateFactoryMarker annotation, to mark functions that create states and must be wrapped in a remember call. (I64550)
  • Add primitive versions of State and MutableState (fb3d89)
  • Added Snapshot.isApplyObserverNotificationPending (I672a5)

Bug Fixes

  • Reduced allocations (I65c09, d7ea77, 727974, and 445808 )
  • Don't retain snapshot reference in ComposerImpl (0206f7)
  • Quick cancellation of compose CoroutineScopes (a55362 and bd382f)
  • Don’t apply composition twice (f5791b)
  • Ensure invalidation for non-initialized derived state values (aa2a92)
  • Call onEndChanges during composition dispose. (62cc8c)
  • Fix moving content into a sub-composition (4beb41)
  • Fix potential deadlocks (c1a425
  • ON_STOP should pause the frame clock broadcasts instead of composition (f4a2d1)
  • Fix changed flags for restarted lambdas (8a03e9)
  • Execute deactivation callbacks for LayoutNode before disposing effects (8b0fa4)

External Contribution

  • Added Snapshot.isApplyObserverNotificationPending (I672a5)

Compose UI: v1.5.0-beta01

May 24, 2023

androidx.compose.ui:ui-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Removed allocations in recomposition, color animations, and AndroidComposeView (Ib2bfa)
  • Adds helper fun CacheDrawModifierNode() to allow delegation (Icf8f9)
  • Introducing isLookingAhead property, accessible from MeasureScope, to observe lookahead results and influence main pass if desired. (Ibf4c3)
  • New semantics property traversalIndex, a float used to reorder nodes in TalkBack traversal (lower values come before). (I9a81b, b/186443263)
  • Renaming the Semantics property isContainer to isTraversalGroup (I121f6)
  • ColorProducer now has an operator fun invoke instead of produce (I4a9a2)
  • Add Path transform API to apply translation/scale/rotation transformations to path objects. (I23434, b/233772232)
  • ColorProducer's method is called produce. (I78bde)
  • Rename toFrameworkColorSpace to toAndroidColorSpace (I4f547)
  • Rename ColorLambda to ColorProducer. (I73b1a)
  • Introduce APIs to convert between Android and Compose colorspace types. (Ie7db4, b/279979665)
  • Added a color parameter to BasicText to allow efficiently animating or setting text color. (Iffd88, b/246961787)
  • Renamed TextRange.constrain to TextRange.coerceIn. (I31be2)
  • Added optimized TextStyle.merge(...) with full parameter list. (Iad234, b/246961787)
  • Stabilized many Text APIs that include Brush, DrawStyle, TextMotion, DrawScope.drawText, Paragraph.paint(Brush), MultiParagraph.paint(Brush). (I2f740, b/261581564, b/261581931, b/261561245)
  • PlatformTextStyle.includeFontPadding is undeprecated. Our original intent was to remove the field, however the feedback shows that developers need this configuration option. Therefore removing deprecation from the field (I98e96, b/277703184)
  • Added public TextRange.constrain method. (I97912)
  • UrlAnnotations in AnnotatedStrings can now be opened via accessibility services like TalkBack. (If4d82, b/253292081)
  • Added the InsertTextAtCursor semantics action for text fields. (I11ed5)
  • LineHeightStyle.Alignment(topRatio) constructor is promoted to stable API. (I79c32, b/261565383)
  • TextMeasurer and related APIs are no longer experimental. (I74647, b/261581753)
  • Added the PerformImeAction semantics action to invoke the IME action on text editor nodes. (Ic606f, b/269633506)
  • PlatformTextInput APIs are no longer experimental for Android. (I668eb)
  • value parameter name for Enum.valueOf changed (Ia9b89)
  • more thrown exceptions from enum valueOf (I818fe)
  • Introduced new low-level PlatformTextInputAdapter API for building custom text input implementations that talk directly to platform APIs. (I58df4)
  • Added BlendMode parameter to DrawScope.drawText, Paragraph.paint, and MultiParagraph.paint methods to support different blending algorithms when drawing text on Canvas. (I57508)
  • Rename Font.MaximumAsyncTimeout to Font.MaximumAsyncTimeoutMillis. Rename only. (I07af5)
  • Updated DPI values of @Preview reference devices (Id6151, b/254528382)
  • Add brush, alpha parameters to BasicText to allow efficiently animating or setting text brush.
  • Define box-free lambda types for Float, Double, Long, Int, Short in :ui:ui-unit (I6f18d, b/246961787)

Bug Fixes

  • Removed multiple allocations in pointer velocity tracking (I26bae)
  • Reduced allocations in layout and pointer input management (I5333a)
  • Optimize Vector memory usage and first-frames rendering (I2f3c6)
  • Removed allocations when drawing lines and points with Canvas (I9f535)
  • Add docs for AndroidFont.fontVariationSettings (I7d9e2)

External Contribution

  • Improved performance and reduce allocations in Vector APIs (I906cb)

Constraintlayout: v2.2.0-alpha10

May 24, 2023

androidx.constraintlayout:constraintlayout:2.2.0-alpha10 is released. Version 2.2.0-alpha10 contains these commits.

Bug Fixes

  • Fix a broken link of the MotionLayout doc. (51cbe88)

ConstraintLayout-compose, and ConstraintLayout-Core 1.1: v1.1.0-alpha10

May 24, 2023

androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10, androidx.constraintlayout:constraintlayout-compose-android:1.1.0-alpha10, and androidx.constraintlayout:constraintlayout-core:1.1.0-alpha10 are released. Version 1.1.0-alpha10 contains these commits.

API Changes

  • MotionLayout Api is no longer experimental, this represents the initial set of stable Api for MotionLayout. (I288f4)
  • Removed MotionLayoutState. (Id3ac1)
  • You may now use DebugFlags for visual debugging: DebugFlags(showBounds = true). (Ic714b)
  • Changed extension variable Dp.asDimension to a method: Dp.asDimension(). (I2d6ef)
  • Staggered now supported in the MotionLayout DSL, define the maximum delay with TransitionScope.staggered, you may also use ConstrainScope.staggeredWeight (within a MotionSceneScope) to get a custom staggered order. (I70275)
  • Two changes made for the Grid helper: 1. paddingLeft and paddingRight to paddingStart and paddingEnd, respectively, and 2. update the format of gridSpans and gridSkip to an array of the Span and Skip objects to make it more structural. (Idd1eb)

Core and Core-ktx: v1.11.0-beta01

May 24, 2023

androidx.core:core:1.11.0-beta01, androidx.core:core-ktx:1.11.0-beta01, and androidx.core:core-testing:1.11.0-beta01 are released. Version 1.11.0-beta01 contains these commits.

API Changes

  • Add ViewCompat support to method performHapticFeedback (Ib02c6)
  • Change getDisplay to #getDisplayOrDefault (I96ff9)
  • Add ContextCompat#getDisplay(Context) (I7011f, b/178183326)

Bug Fixes

  • Clarify CollectionInfoCompat docs, especially isHierarchical (I14f6c)

Emoji2: v1.4.0-beta04

May 24, 2023

androidx.emoji2:emoji2-*:1.4.0-beta04 is released. Version 1.4.0-beta04 contains these commits.

This release fixes a bug present since 1.0 where views with a non-main handler would throw an exception when attempting to update the emoji spans after font load completes. There is no workaround, if you are impacted by this bug please upgrade to this version or later.

Bug Fixes

  • EmojiCompat init callbacks will now use the handler from each view, respecting views not on the main thread. (Iccbcf)

Games Frame Pacing: v2.1.0-beta01

May 24, 2023

androidx.games:games-frame-pacing:2.1.0-beta01 is released. Version 2.1.0-beta01 contains these commits.

Bug Fixes

  • Timeout in case NDKChoreographer initialization fails (ef466d)
  • When using SwappyGL_getSupportedRefreshPeriodsNS query refresh rates explicitly from the system (c85235)

Games-Memory-Advice version 2.0.0: v2.0.0-beta04

May 24, 2023

androidx.games:games-memory-advice:2.0.0-beta04 is released. Version 2.0.0-beta04 contains these commits.

New Features

  • Updated the machine learning model powering the library which’ll allow improved results for newer phones

Games-Activity: v2.0.2

May 24, 2023

androidx.games:games-activity:2.0.2 is released. Version 2.0.2 contains these commits.

Bug Fixes

GridLayout: v1.1.0-beta01

May 24, 2023

androidx.gridlayout:gridlayout:1.1.0-beta01 is released with no changes. Version 1.1.0-beta01 contains these commits.

Navigation: v2.7.0-alpha01

May 24, 2023

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

Animations from Accompanist

Now that AnimatedContent is stable, we were able to move the code from Accompanist Navigation Animation back into Navigation Compose itself.

This means all of the support for setting custom transitions that existed in AnimatedNavHost is directly supported in NavHost.

No additional changes will be made to Accompanist Navigation Animation and we’ll be formally deprecating it soon, along with guidance on how to migrate back to Navigation Compose itself, but it'll be the inverse of the migration guide with no other API changes required if you're already using the latest Accompanist alpha (0.31.2-alpha). (b/197140101)

Bug Fixes

  • From Navigation 2.6.0-rc02: Fixed an issue with Navigation in Fragments where navigating with popUpTo and popping a fragment off the back stack without recreating its view would cause system back to stop working. (Ieb8d4, b/281726455)

Dependency Updates

  • Navigation now depends on Compose 1.5.0-beta01.

Navigation: v2.6.0-rc02

May 24, 2023

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

Bug Fixes

  • Fixed an issue with Navigation in Fragments where navigating with popUpTo and popping a fragment off the back stack without recreating its view would cause system back to stop working. (Ieb8d4, b/281726455)

Paging: v3.2.0-alpha06

May 24, 2023

androidx.paging:paging-*:3.2.0-alpha06 is released. Version 3.2.0-alpha06 contains these commits.

New Features

  • Added a new PagingSourceFactory functional interface that provides a more explicit API surface than the existing () -> PagingSource lambdas. This factory can be used to instantiate a Pager. (I33165, b/280655188)
  • Added new paging-testing API of List<Value>.asPagingSourceFactory() to get a PagingSourceFactory that only loads from an immutable list of data. The existing extension on Flow<List<Value>> should still be used for testing with multiple generations of static data. (Id34d1, b/280655188)

API Changes

  • All public APIs in paging-testing are now annotated with @VisibleForTesting to ensure these APIs are used only in tests. (I7db6e)
  • The asSnapshot API no longer requires passing in a CoroutineScope. It now defaults to using the context inherited from its parent scope. (Id0a78, b/282240990)
  • Reordered TestPager constructor parameters to intuitively match the order of real Pager constructor parameters (I6185a)
  • Migrated paging-testing's use of lambda type () -> PagingSource<Key, Value> to type PagingSourceFactory<Key, Value>. (I4a950, b/280655188)

Behavior Changes

  • Main dispatcher is no longer required to run asSnapshot Paging tests. Setting it no longer makes any changes to the test behavior. (Ie56ea)

Paging Compose: v1.0.0-alpha20

May 24, 2023

androidx.paging:paging-compose:1.0.0-alpha20 is released. Version 1.0.0-alpha20 contains these commits.

New Features

  • Paging Compose now supports previewing a list of fake data by creating a PagingData.from(fakeData) and wrapping that PagingData in a MutableStateFlow (e.g., MutableStateFlow(PagingData.from(listOf(1, 2, 3)))). By using that data as the input into your @Preview, calls to collectAsLazyPagingItems() will provide previewable LazyPagingItems. (I8a78d, b/194544557)

Bug Fixes

  • Cached data from pager.flow.cachedIn that has been collected in LazyPagingItems will now be immediately available after state restoration without requiring asynchronous collection. This means the cached data will be ready for presentation immediately upon initial composition after state is restored. (I97a60, b/177245496)

privacysandbox-tools: v1.0.0-alpha04

May 24, 2023

androidx.privacysandbox.tools:tools-*:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.

New Features

  • CancellationExceptions are now propagated to apps, so SDKs can now cancel their coroutines as expected.
  • SdkActivityLaunchers can now be used in SDK APIs, so apps can send launchers to SDKs in the Privacy Sandbox. Note that this functionality is only available in developer previews at the moment.

Bug Fixes

  • Non-suspend functions declared by SDKs will now run in the main thread by default. They used to run in Binder threads.
  • Services can no longer inherit from UI interface adapters.
  • Fixed an issue where defining a UI adapter property in a data class would cause a compilation error.

privacysandbox ui: v1.0.0-alpha03

May 24, 2023

androidx.privacysandbox.ui:ui-client:1.0.0-alpha03, androidx.privacysandbox.ui:ui-core:1.0.0-alpha03, and androidx.privacysandbox.ui:ui-provider:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits.

New Features

  • StateChangedListener informs the application of changes in the UI session

API Changes

  • Added StateChangedListener to replace the ErrorConsumer (Icd5d3)

Bug Fixes

  • Fixed notifyZOrderChanged race condition so the UI provider is notified for all Z-order changes

Recyclerview: v1.3.1-rc01

May 24, 2023

androidx.recyclerview:recyclerview:1.3.1-rc01 is released. Version 1.3.1-rc01 contains these commits.

Users of ViewPager2 must update to at least 1.1.0-beta02 when updating to this version of RecyclerView to avoid crashes.

API Changes

  • Add new setDebugAssertionsEnabled and setVerboseLoggingEnabled methods that can aid in debugging RecyclerView-related issues in apps. (I514b9)

Bug Fixes

  • Fix crashes for users of ViewTreeLifecycleOwner (including ComposeView) by temporarily re-attaching temporarily detached views when calling onBind. (I7244f2c, b/265347515, b/283288295)

Tracing: v1.2.0-rc01

May 24, 2023

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

Bug Fixes

  • Prevent crashes when long trace section names are passed by truncating automatically (Iaf6e2)

ViewPager2: v1.1.0-beta02

May 24, 2023

androidx.viewpager2:viewpager2:1.1.0-beta02 is released. Version 1.1.0-beta02 contains these commits.

API Changes

  • Added Fragment state saving callbacks to FragmentTransactionCallback. (I45b90)
  • ViewPager2 now no longer tries to fix the broken WindowInsets dispatch of old API versions (< 30), because the fix itself can be harmful to siblings of ViewPager2. The fix is still available, but has become an opt-in so developers can decide on a case by case basis. Enable the fix by calling WindowInsetsApplier.install(viewPager2)). (Ic9a85)

Bug Fixes

  • Fix compatibility issues with newer versions of RecyclerView. Users of this version of ViewPager2 should update to at least RecyclerView 1.3.1-rc01.

Wear Compose: v1.2.0-beta01

May 24, 2023

androidx.wear.compose:compose-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

What’s in Compose for Wear OS 1.2

The 1.2-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.2 includes the following new functionality:

  • expandableItem and expandableItems are two new Foundation components that support expanding items within a ScalingLazyColumn. Use expandableItem for a single expandable item, such as Text in which the number of lines. Use expandableItems for a group of expandable items and expandableButton to simplify creating a button that collapses after the content is expanded.
  • HierarchicalFocusCoordinator - this experimental composable enables marking sub-trees of the composition as focus enabled or focus disabled PickerGroup - a new composable for handling multiple pickers together. It handles focus between the pickers using the HierarchicalFocusCoordinator API and enables auto-centering of picker items.
  • Picker - the API now includes userScrollEnabled to control whether the picker is active for user scrolling.
  • Placeholder - we have made updates to the shimmer and ‘Wipe Off’ animations. The wipe-off effect is now immediately applied when the content is ready.
  • ScalingLazyColumn - we have migrated ScalingLazyColumn and associated classes from androidx.wear.compose.material.ScalingLazyColumn to androidx.wear.compose.foundation.lazy.ScalingLazyColumn. Please update to use the Foundation.Lazy version.
  • SwipeToReveal - we have added experimental support for swipe-to-reveal as a means to access secondary actions, supplementing the existing ‘long press’ pattern.
  • Stepper - now has an overload with an additional enableRangeSemantics parameter to facilitate disabling the default range semantics.
  • Previews - we have added the following custom annotations for previewing composables on Wear screens: WearPreviewSmallRound previews the composable on a small, round device; WearPreviewLargeRound previews the composable on a large round device; WearPreviewSquare previews the composable on a square device. Also, the following and multi-preview annotations: WearPreviewFontScales previews the composables on a wear device with multiple font sizes, while WearPreviewDevices previews the composables on different wear devices.
  • We have added a DefaultTextStyle to Wear Compose which defaults the PlatformTextStyle.includeFontPadding property to true (this is the current setting). This will allow us to synchronize turning off font padding by default with the Compose libraries in an early 1.3 alpha version - see 1.2.0-alpha10 for more information.

New Features

  • We have added experimental support for disabled scaling and fading animation when reduce_motion setting is switched on. (I58024)

Bug Fixes

  • Improved documentation for angularWidthDp in CurvedSize.kt (Iab75c)
  • SwipeDismissableNavHost now logs a warning with potential causes of empty backstack. This is done to prevent unexpected crashes caused because of IllegalArgumentException which was thrown when the backstack was empty. (I04a81, b/277700155)

Wear Compose Material3: v1.0.0-alpha05

May 24, 2023

androidx.wear.compose:compose-material3:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

New Features

  • We have added TextButton to Material3, a circular button with a single slot for text. For different sizes of TextButton, we recommend using Modifier.touchTargetAwareSize and ExtraSmallButtonSize, SmallButtonSize, DefaultButtonSize and LargeButtonSizeIcon provided in TextButtonDefaults. The default TextButton has no border and a transparent background for low emphasis actions. For actions that require high emphasis, use filledTextButtonColors; for a medium-emphasis, outlined TextButton, set the border to ButtonDefaults.outlinedButtonBorder; for a middle ground between outlined and filled, use filledTonalTextButtonColors. (I667e4)
  • We have added Card, OutlinedCard, AppCard and TitleCard into the Wear Compose Material3 library. AppCard and TitleCard can also be given the outlined appearance using CardDefaults.outlinedCardColors and CardDefaults.outlinedCardBorder(I80e72)

API Changes

  • We have moved the Button label parameter to the end to support trailing lambda syntax and removed the role parameter (as this can be overridden using Modifier.semantics). ButtonColors constructors are now public. (Ie1b6d)

wear protolayout: v1.0.0-alpha10

May 24, 2023

androidx.wear.protolayout:protolayout-*:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

New Features

  • Add AppDataKey for accessing app pushed state; Add PlatformDataKey for accessing platform data; Add namespace support in StateStore. (I7985e)
  • Support Equal and NotEqual operations for DynamicBool. (I6a0c1)

API Changes

  • FontStyles class is now final (Iaa2ea)
  • LayoutElementBuilders#FontStyles has been deprecated. Please use androidx.wear.protolayout.Typography or create your own FontStyle. (Ic929b)
  • Hide Action#Builder nested interface from Action interface. Implementations of Builder are already provided by LoadAction and LaunchAction classes. (I1d70c)
  • Allow using DynamicFloat with FloatProp. Note that FloatProp do no require layout constraints as it's not used as a layout changing prop. (I286ac)
  • The LoalAction and SetStateAction actions are removed as they were not really supported yet. (I5d6a6)
  • Added support for ARGB_8888 format for inline image resources. (I8a07c)
  • Rename StateEntryValue to DynamicDataValue, and update the state APIS to use the DynamicDataKey (If1c01)
  • We are limiting the number of entries that are allowed in the StateStore in order to ensure that memory usage and state update time are well contained and controlled for each instance of the StateStore. As a result, the developer needs to ensure that they do not have more than MAX_STATE_ENTRY_COUNT entries in the map otherwise they will get an IllegalStateException when creating or updating the StateStore. (Ibadb3)
  • Hide OnLoadTrigger and OnConditionMetTrigger classes, and rename setTrigger to setCondition for OnConditionMetTrigger. (Ibf629)
  • For performance and compatibility reasons, the ProtoLayout renderers won't support the full set of features in AnimatedVectorDrawable resources. We're marking those APIs as experimental until we can define the supported set. (Ic6daf)
  • Added dynamic types for daily distance, daily calories and daily floors. Keys for platform health sources are now under PlatformHealthSources.Keys (Ib7637)
  • The Easing.cubicBezier method replaces the CubicBezierEasing.Builder. With that the EasingFunction class is removed and the easing constants from that class are now directly accessible from the Easing interface. In addition setInfiniteRepeatable is replaced by INFINITE_REPEATABLE_WITH_RESTART and INFINITE_REPEATABLE_WITH_REVERSE (Ib41e7)
  • Implement PlatformDataProvider to provide heart rate and daily steps. SensorGateway interface is removed from public API. (I55b84)
  • Add PlatformDataProvider, and update StateStore to register to PlatformDataProvider when the provider's supported key is required by node from expression pipeline. (Ib616a)
  • SensorGateway is no longer Closeable as it no longer maintains any state. (I6b4f7)
  • Allow using FloatProp with DynamicFloat for progress in CircularProgressIndicator. This is supported for renderers supporting version 1.2. Old renderers will fallback to the staticValue if provided, otherwise to 0 (I0d91b)
  • MultiButtonLayout constants have been refactored into LayoutDefaults.MultiButtonLayoutDefaults class which now contains those for button sizes depending on a number of buttons in the layout. (I13973)
  • Support using StringProp with DynamicString in Material Text. This is supported for renderers supporting version 1.2. Old renderers will fallback to the provided static value. Update Text#getText return type from String to StringProp. (I7275b)

Wear Tiles: v1.2.0-alpha06

May 24, 2023

androidx.wear.tiles:tiles-*:1.2.0-alpha06 is released. Version 1.2.0-alpha06 contains these commits.

API Changes

  • Rename StateEntryValue to DynamicDataValue, and update the state APIs to use the DynamicDataKey (If1c01)
  • We are limiting the number of entries that are allowed in the StateStore in order to ensure that memory usage and state update time are well contained and controlled for each instance of the StateStore. As a result, the developer needs to ensure that they do not have more than MAX_STATE_ENTRY_COUNT entries in the map otherwise they will get an IllegalStateException when creating or updating the StateStore. (Ibadb3)

Webkit: v1.7.0

May 24, 2023

androidx.webkit:webkit:1.7.0 is released. Version 1.7.0 contains these commits.

Important changes since 1.6.0

  • We added support for Image drag in WebView. You can enable your users to drag images out of the WebView by adding the new DropDataContentProvider to your app's manifest as described in the class documentation.
  • We added the ProcessGlobalConfig#setDirectoryBasePaths(Context,File,File) API which can be used to set the base directories that WebView will use for the current process. As with all methods on ProcessGlobalConfig, this method must be called before the first instance of WebView is instantiated. This method is added to provide Android framework the capability to tweak WebView settings. For general purpose applications, using this method is not recommended.

WindowManager: v1.2.0-alpha01

May 24, 2023

androidx.window:window-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.

New Features

Stabilize testing APIs around Activity Embedding and WindowLayoutInfoTracker. ActivityEmbeddingRule has been promoted to stable. WindowMetricsCalculatorRule has been promoted to stable. Utility functions to create a FoldingFeature for test have been promoted to stable.

API Changes

  • Stabilize ActivityEmbeddingRule to support unit testing around Activity embedding. (I8d6b6)
  • WindowMetrisCalculatorTestRule is stable allowing stub metrics for JVM tests. We recommend using an emulator for accurate results.
  • Stabilize test APIs for WindowLayoutInfo to support JVM testing. (Ie036e)
  • Add IntRange for test folding feature values. (I69f7d)