2023-05-24
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
ReportDrawncrashing when navigating away from a screen beforereportis 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
ListenableFutureand don't have Async suffix. (I0515f) - Adds the ability to configure projections by a
Documentclass. (I94576) - Adds getters/setters for
Features#NUMERIC_SEARCH,Features#VERBATIM_SEARCHandFeatures#LIST_FILTER_QUERY_LANGUAGE. Also addsFeatures#LIST_FILTER_QUERY_LANGUAGE. (Ic7204) - Adds
@RequiresFeaturetoJoinSpec. (Ic126c) - Add
LongPropertyConfigindexing type intoAppSearchcompiler. (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
SearchSuggestionAPIinAppSearchSession. (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
LongPropertyConfigindexing API. (Ie0fb5) - Added
RFC822_TOKENIZATIONas a tokenizer type (I8a390) - Updated APIs for
ImageObjectto be a bit more idiomatic. (If8cd5) - Added new Document type
ImageObjectmodeled after http://schema.org/ImageObject. (I6a0c0) - Add fields from
ThingtoAlarm,AlarmInstance,Timer,Stopwatch,StopwatchLap,ContactPoint, andPerson(Id876c) - Add Person and
ContactPointfor querying Person corpus inAppSearch. (Ia58f9) - Adds
LocalStorage.createGlobalSearchSessionAPI 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
VideoCapturecould 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 newCameraInfo#getSupportedFrameRates()API.
API Changes
- Renamed
ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF/ONconstants toALLOWED_RESOLUTIONS_NORMAL/SLOWand renamed the buildersetHighResolutionEnabledFlagfunction name tosetAllowedResolutionMode. (Iae817) CameraInfo#getSupportedFrameRateRanges()now returns aSetrather than aListto better represent that the ranges are unordered. (I02f43)- Add an error listener to
CameraEffectto handle unrecoverable errors (Ice471) - Add public constructor in
ResolutionInfofor better testability (If6d1c) - Provided an API
UseCase.snapToSurfaceRotation(int)to replace usage ofsetTargetRotationDegreesand deprecate APIImageAnalysis.setTargetRotationDegrees(int),ImageCapture.setTargetRotationDegrees(int)andVideoCapture.setTargetRotationDegrees(int). (Ia9010) - Added new API
Preview#getTargetFrameRateandPreview.Builder#setTargetFrameRateto be able to set and retrieve target frame rate for Preview use case (If4f22) VideoRecordEvent.Finalizewill now complete with error codeERROR_RECORDING_GARBAGE_COLLECTEDwhen theRecordingobject is stopped due to garbage collection. (Iba974)
Bug Fixes
- Fixed
NullPointerExceptionwhen the cached output sizes inStreamConfigurationMapCompatare null. (Idf124, b/282025204) - Fixed the issue that
Preview.setSurfaceProvider(null)doesn't pause the preview in Extensions (Ia903e) - Fixed an issue where
ConcurrentModificationExceptionis thrown during camera opening whenVideoCaptureis 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
PlatformDataProviderto provide heart rate and daily steps.SensorGatewayinterface 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 andBottomDrawerState's offset are not nullable anymore. They instead returnFloat.NaNto indicate the absence of the offset. (Ie9855)- Added an option to pass in a
ScrollStatewhen constructing aDropdownMenuor anExposedDropdownMenufor controlling the vertical scroll state of the displayed menu items. (Idb009, b/185304441) - Add the support for enabling/disabling the gesture of
ModalBottomSheetLayoutso that user could configure this for more featured bottomsheet (I40af0) - Added a color parameter to
BasicTextto allow efficiently animating or setting text color. (Iffd88, b/246961787) - Renaming the Semantics property
isContainertoisTraversalGroup(I121f6)
Bug Fixes
- Fixed the
AlertDialogdismiss 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
ModalBottomSheetmay now be drawn behind status bar withwindowInsetsset to zero - Updated default
ModalBottomSheetfunctionality to stay outside of system bars including navigation - Status bar inset handling is provided by drag handle in edge-to-edge mode.
BottomSheetDefaultsincludes window insets forBottomSheetWindow. (I31200, b/274872542, b/272973615, b/272334475, b/268432129, b/275849044, b/275486106, b/268433162)
- Scrim for
- Deprecate
Indicatorand addPrimary/SecondaryIndicatorto match the M3 specs.PrimaryIndicatormatches the width of the tab's content whereasSecondaryIndicatorspans the full available width.SecondaryIndicatoris equivalent to the now deprecatedIndicatorand can be a direct replacement. (I27604) - Added an option to pass in a
ScrollStatewhen constructing aDropdownMenuor anExposedDropdownMenufor controlling the vertical scroll state of the displayed menu items. (Ia0734, b/185304441) - Added an overload for
Sliderthat is a stateful version of the component. CreatedSliderStatethat holds all of the information for the current active track, the measurements of the components of theSlider, and the drag and gesture logic. (I124a5) - Renaming the Semantics property
isContainertoisTraversalGroup(I121f6) - Added optimized
TextStyle.merge(...)with full parameter list. (Iad234, b/246961787) - Made
TooltipState,RichTooltipState, andPlainTooltipStatepublic interfaces. AddedRichTooltipStateImplandPlainTooltipStateImplfor default states. Addedremember*Statefunctions to obtain these implemented states. RemovedTooltipSyncin favor of anTooltipDefault.GlobalMutatorMutex. (I7813d) - Updated the
DatePickerColorsto include additional customization options for the date picker divider, navigation, and text input fields colors. (I1a685, b/274626815) DatePickerStateand theDateRangePickerStateare now public interfaces with default implementations that can be retrieved by therememberDatePickerStateandrememberDateRangePickerState. (I71c52)- Removed the
dateValidatorfromDatePickerandDateRangePickerand introduced aSelectableDatesinterface that can be set on the state to control which dates or years are selectable in the UI. (Ic2fc6) TimePickerremoved from stable API, further changes are expected in the state API (I3f39a)ModalBottomSheetmoved to android only.ModalBottomSheetis not recommended for desktop use, and the functionality is not actively maintained. (Ib3778)
Bug Fixes
- Fixed the
AlertDialogdismiss 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
ListItemusing incorrect padding for three-line items. (I6e235) ModalBottomSheetnow 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
@StateFactoryMarkerannotation, to mark functions that create states and must be wrapped in aremembercall. (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
onEndChangesduring 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
LayoutNodebefore 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
isLookingAheadproperty, accessible fromMeasureScope, to observe lookahead results and influence main pass if desired. (Ibf4c3) - New semantics property
traversalIndex, a float used to reorder nodes inTalkBacktraversal (lower values come before). (I9a81b, b/186443263) - Renaming the Semantics property
isContainertoisTraversalGroup(I121f6) ColorProducernow has anoperator fun invokeinstead ofproduce(I4a9a2)- Add
Pathtransform API to apply translation/scale/rotation transformations to path objects. (I23434, b/233772232) ColorProducer's method is calledproduce. (I78bde)- Rename
toFrameworkColorSpacetotoAndroidColorSpace(I4f547) - Rename
ColorLambdatoColorProducer. (I73b1a) - Introduce APIs to convert between Android and Compose colorspace types. (Ie7db4, b/279979665)
- Added a color parameter to
BasicTextto allow efficiently animating or setting text color. (Iffd88, b/246961787) - Renamed
TextRange.constraintoTextRange.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.includeFontPaddingis 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.constrainmethod. (I97912) UrlAnnotations inAnnotatedStrings can now be opened via accessibility services likeTalkBack. (If4d82, b/253292081)- Added the
InsertTextAtCursorsemantics action for text fields. (I11ed5) LineHeightStyle.Alignment(topRatio)constructor is promoted to stable API. (I79c32, b/261565383)TextMeasurerand related APIs are no longer experimental. (I74647, b/261581753)- Added the
PerformImeActionsemantics action to invoke the IME action on text editor nodes. (Ic606f, b/269633506) PlatformTextInputAPIs are no longer experimental for Android. (I668eb)- value parameter name for
Enum.valueOfchanged (Ia9b89) - more thrown exceptions from enum valueOf (I818fe)
- Introduced new low-level
PlatformTextInputAdapterAPI for building custom text input implementations that talk directly to platform APIs. (I58df4) - Added
BlendModeparameter toDrawScope.drawText,Paragraph.paint, andMultiParagraph.paintmethods to support different blending algorithms when drawing text on Canvas. (I57508) - Rename
Font.MaximumAsyncTimeouttoFont.MaximumAsyncTimeoutMillis. Rename only. (I07af5) - Updated DPI values of
@Previewreference devices (Id6151, b/254528382) - Add
brush,alphaparameters toBasicTextto 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
MotionLayoutdoc. (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
MotionLayoutApi is no longer experimental, this represents the initial set of stable Api forMotionLayout. (I288f4)- Removed
MotionLayoutState. (Id3ac1) - You may now use
DebugFlagsfor visual debugging:DebugFlags(showBounds = true). (Ic714b) - Changed extension variable
Dp.asDimensionto a method:Dp.asDimension(). (I2d6ef) - Staggered now supported in the
MotionLayoutDSL, define the maximum delay withTransitionScope.staggered, you may also useConstrainScope.staggeredWeight(within aMotionSceneScope) to get a custom staggered order. (I70275) - Two changes made for the Grid helper: 1.
paddingLeftandpaddingRighttopaddingStartandpaddingEnd, respectively, and 2. update the format ofgridSpansandgridSkipto 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
ViewCompatsupport to methodperformHapticFeedback(Ib02c6) - Change
getDisplayto#getDisplayOrDefault(I96ff9) - Add
ContextCompat#getDisplay(Context)(I7011f, b/178183326)
Bug Fixes
- Clarify
CollectionInfoCompatdocs, especiallyisHierarchical(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
EmojiCompatinit 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
NDKChoreographerinitialization fails (ef466d) - When using
SwappyGL_getSupportedRefreshPeriodsNSquery 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
- Stability fixes in
GameActivityEvents(b/278017467)
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 withpopUpToand 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
popUpToand 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
PagingSourceFactoryfunctional interface that provides a more explicit API surface than the existing() -> PagingSourcelambdas. This factory can be used to instantiate aPager. (I33165, b/280655188) - Added new
paging-testingAPI ofList<Value>.asPagingSourceFactory()to get aPagingSourceFactorythat only loads from an immutable list of data. The existing extension onFlow<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
@VisibleForTestingto ensure these APIs are used only in tests. (I7db6e) - The
asSnapshotAPI no longer requires passing in aCoroutineScope. It now defaults to using the context inherited from its parent scope. (Id0a78, b/282240990) - Reordered
TestPagerconstructor parameters to intuitively match the order of realPagerconstructor parameters (I6185a) - Migrated paging-testing's use of lambda type
() -> PagingSource<Key, Value>to typePagingSourceFactory<Key, Value>. (I4a950, b/280655188)
Behavior Changes
- Main dispatcher is no longer required to run
asSnapshotPaging 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 thatPagingDatain aMutableStateFlow(e.g.,MutableStateFlow(PagingData.from(listOf(1, 2, 3)))). By using that data as the input into your@Preview, calls tocollectAsLazyPagingItems()will provide previewableLazyPagingItems. (I8a78d, b/194544557)
Bug Fixes
- Cached data from
pager.flow.cachedInthat has been collected inLazyPagingItemswill 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
CancellationExceptionsare now propagated to apps, so SDKs can now cancel their coroutines as expected.SdkActivityLauncherscan 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
StateChangedListenerinforms the application of changes in the UI session
API Changes
- Added
StateChangedListenerto replace theErrorConsumer(Icd5d3)
Bug Fixes
- Fixed
notifyZOrderChangedrace 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
setDebugAssertionsEnabledandsetVerboseLoggingEnabledmethods that can aid in debuggingRecyclerView-related issues in apps. (I514b9)
Bug Fixes
- Fix crashes for users of
ViewTreeLifecycleOwner(includingComposeView) by temporarily re-attaching temporarily detached views when callingonBind. (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) ViewPager2now no longer tries to fix the brokenWindowInsetsdispatch of old API versions (< 30), because the fix itself can be harmful to siblings ofViewPager2. 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 callingWindowInsetsApplier.install(viewPager2)). (Ic9a85)
Bug Fixes
- Fix compatibility issues with newer versions of
RecyclerView. Users of this version ofViewPager2should update to at leastRecyclerView1.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:
expandableItemandexpandableItemsare two newFoundationcomponents that support expanding items within aScalingLazyColumn. UseexpandableItemfor a single expandable item, such as Text in which the number of lines. UseexpandableItemsfor a group of expandable items andexpandableButtonto 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 disabledPickerGroup- a new composable for handling multiple pickers together. It handles focus between the pickers using theHierarchicalFocusCoordinatorAPI and enables auto-centering of picker items.Picker- the API now includesuserScrollEnabledto 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 migratedScalingLazyColumnand associated classes fromandroidx.wear.compose.material.ScalingLazyColumntoandroidx.wear.compose.foundation.lazy.ScalingLazyColumn. Please update to use theFoundation.Lazyversion.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 additionalenableRangeSemanticsparameter to facilitate disabling the default range semantics.Previews- we have added the following custom annotations for previewing composables on Wear screens:WearPreviewSmallRoundpreviews the composable on a small, round device;WearPreviewLargeRoundpreviews the composable on a large round device;WearPreviewSquarepreviews the composable on a square device. Also, the following and multi-preview annotations:WearPreviewFontScalespreviews the composables on a wear device with multiple font sizes, whileWearPreviewDevicespreviews the composables on different wear devices.- We have added a
DefaultTextStyleto Wear Compose which defaults thePlatformTextStyle.includeFontPaddingproperty 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
angularWidthDpinCurvedSize.kt(Iab75c) SwipeDismissableNavHostnow logs a warning with potential causes of empty backstack. This is done to prevent unexpected crashes caused because ofIllegalArgumentExceptionwhich 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
TextButtonto Material3, a circular button with a single slot for text. For different sizes ofTextButton, we recommend usingModifier.touchTargetAwareSizeandExtraSmallButtonSize,SmallButtonSize,DefaultButtonSizeandLargeButtonSizeIconprovided inTextButtonDefaults. The defaultTextButtonhas no border and a transparent background for low emphasis actions. For actions that require high emphasis, usefilledTextButtonColors; for a medium-emphasis, outlinedTextButton, set the border toButtonDefaults.outlinedButtonBorder; for a middle ground between outlined and filled, usefilledTonalTextButtonColors. (I667e4) - We have added
Card,OutlinedCard,AppCardandTitleCardinto the Wear Compose Material3 library.AppCardandTitleCardcan also be given the outlined appearance usingCardDefaults.outlinedCardColorsandCardDefaults.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).ButtonColorsconstructors 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
AppDataKeyfor accessing app pushed state; AddPlatformDataKeyfor accessing platform data; Add namespace support inStateStore. (I7985e) - Support
EqualandNotEqualoperations forDynamicBool. (I6a0c1)
API Changes
FontStylesclass is now final (Iaa2ea)LayoutElementBuilders#FontStyleshas been deprecated. Please useandroidx.wear.protolayout.Typographyor create your ownFontStyle. (Ic929b)- Hide
Action#Buildernested interface fromActioninterface. Implementations of Builder are already provided byLoadActionandLaunchActionclasses. (I1d70c) - Allow using
DynamicFloatwithFloatProp. Note thatFloatPropdo no require layout constraints as it's not used as a layout changing prop. (I286ac) - The
LoalActionandSetStateActionactions are removed as they were not really supported yet. (I5d6a6) - Added support for ARGB_8888 format for inline image resources. (I8a07c)
- Rename
StateEntryValuetoDynamicDataValue, and update the state APIS to use theDynamicDataKey(If1c01) - We are limiting the number of entries that are allowed in the
StateStorein order to ensure that memory usage and state update time are well contained and controlled for each instance of theStateStore. As a result, the developer needs to ensure that they do not have more thanMAX_STATE_ENTRY_COUNTentries in the map otherwise they will get anIllegalStateExceptionwhen creating or updating theStateStore. (Ibadb3) - Hide
OnLoadTriggerandOnConditionMetTriggerclasses, and renamesetTriggertosetConditionforOnConditionMetTrigger. (Ibf629) - For performance and compatibility reasons, the
ProtoLayoutrenderers won't support the full set of features inAnimatedVectorDrawableresources. 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.cubicBeziermethod replaces theCubicBezierEasing.Builder. With that theEasingFunctionclass is removed and the easing constants from that class are now directly accessible from theEasinginterface. In additionsetInfiniteRepeatableis replaced byINFINITE_REPEATABLE_WITH_RESTARTandINFINITE_REPEATABLE_WITH_REVERSE(Ib41e7) - Implement
PlatformDataProviderto provide heart rate and daily steps.SensorGatewayinterface is removed from public API. (I55b84) - Add
PlatformDataProvider, and updateStateStoreto register toPlatformDataProviderwhen the provider's supported key is required by node from expression pipeline. (Ib616a) SensorGatewayis no longerCloseableas it no longer maintains any state. (I6b4f7)- Allow using
FloatPropwithDynamicFloatfor progress inCircularProgressIndicator. This is supported for renderers supporting version 1.2. Old renderers will fallback to thestaticValueif provided, otherwise to 0 (I0d91b) MultiButtonLayoutconstants have been refactored intoLayoutDefaults.MultiButtonLayoutDefaultsclass which now contains those for button sizes depending on a number of buttons in the layout. (I13973)- Support using
StringPropwithDynamicStringin Material Text. This is supported for renderers supporting version 1.2. Old renderers will fallback to the provided static value. UpdateText#getTextreturn type fromStringtoStringProp. (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
StateEntryValuetoDynamicDataValue, and update the state APIs to use theDynamicDataKey(If1c01) - We are limiting the number of entries that are allowed in the
StateStorein order to ensure that memory usage and state update time are well contained and controlled for each instance of theStateStore. As a result, the developer needs to ensure that they do not have more thanMAX_STATE_ENTRY_COUNTentries in the map otherwise they will get anIllegalStateExceptionwhen creating or updating theStateStore. (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 theWebViewby adding the newDropDataContentProviderto 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 thatWebViewwill use for the current process. As with all methods onProcessGlobalConfig, this method must be called before the first instance ofWebViewis instantiated. This method is added to provide Android framework the capability to tweakWebViewsettings. 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
ActivityEmbeddingRuleto support unit testing around Activity embedding. (I8d6b6) WindowMetrisCalculatorTestRuleis stable allowing stub metrics for JVM tests. We recommend using an emulator for accurate results.- Stabilize test APIs for
WindowLayoutInfoto support JVM testing. (Ie036e) - Add
IntRangefor test folding feature values. (I69f7d)