Important changes since 1.9.0:
- Added
@RequiresFlagannotation to flag usages of not yet stable Android platform APIs - Removed support for KMP x86 Apple targets
Important changes since 1.5.0:
- Fixes to support latest version of Android Lint in the bundled lint checks
API Changes
- Removing obsolete
@RequiresApi(21)annotations I44f33 - New
TextAppearanceSpanCompatAPI for working with downloadable font feature I9c1c8 b/197242546 b/393805627
Bug Fixes
- Moving the default
minSdkfrom API 21 to API 23 Ibdfca b/380448311 b/435705964 b/435705223 AppCompathas been updated to use Activity 1.8.0 to allow it to use theinitializeViewTreeOwners()API fromComponentActivityto ensure that it always has the correctViewTreeOwnersset. I96919 b/419208471- Refine
ActionBarContextViewandAppCompatDelegateImplIa83b3 - This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler arguments to enforce correct usage:
-Xjspecify-annotations=strict,-Xtype-enhancement-improvements-strict-modeId9081 b/326456246 - Set the window title of
AlertDialogsfor a11y purposes I8bbdd b/347729115 - Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. I9496c b/345472586
- Correctly set
fontVariationSettingsfromtextAppearanceinAppCompatviews. I20d06 b/264321145 - Dispatch configuration changes in
AppCompatActivityto the view tree Ibece8 b/321896385 - Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed Idb6b5 b/344563182
- Fix Toolbar height calculation to include title/subtitle vertical margins Ia5846 b/267200424
API Changes
- Fix
textfieldselection while editing text during gesture. I2ba33 b/490509264
API Changes
- Promoted
TopAppBarScrollBehaviorand its associated methods to stable. These APIs no longer require the@ExperimentalMaterial3Apiopt-in. Ieb2d1 b/496918628
API Changes
- Mark
DragToResizeandPaneMarginasAPIs as experimental I86c29 - Deprecate
currentWindowAdaptiveInfoand introduce V2 of it I40ecf b/424442112
Important Changes
- core-ktx APIs have been merged into the core library. All Kotlin extensions are now part of the main core artifact. core-ktx is now an empty artifact for compatibility. I6adbe
API Changes
- Add new APIs to get and set math info Ib5ad3 b/394599312
- Add variation settings to customize downloadable variable fonts Ifdc93 b/223262013
- Added
unwrap()toAccessibilityNodeInfoCompat.SelectionCompatto retrieve the underlying platformAccessibilityNodeInfo.Selectionobject. I3078a b/479902413 - Added
getView()andgetVirtualDescendantId()toAccessibilityNodeInfoCompat.SelectionPositionCompat. Ib0c48 b/362783892 - Corrects
ACTION_ARGUMENT_SELECTION_PARCELABLEdefinition in AndroidX to match that within the framework sdk to have a single action literal. Ib40af b/479852824 - Add
EXTRA_PREFER_SMALL_ICONkey constant toNotificationCompatI713c9 b/469460575 b/478869887 - Add support for
MetricStyle, semantic style, and related APIs inNotificationCompat. I6c194 b/445685015 b/446155056 b/446157356 b/467924497 - Annotate
BuildCompat.isAtLeastB_1with @ChecksSdkIntAtLeast I18a28 b/462789273
Bug Fixes
- Fixed
equals()method behavior inAccessibilityNodeInfoCompat.SelectionPositionCompatandAccessibilityNodeInfoCompat.SelectionCompatto properly evaluate equality. Icbe1d b/495537199
Important changes since 1.5.0:
- Fix propagation of
CreatePublicKeyCredentialRequest.isConditionalbit.
New Features
- Add default Wear Widget background when
WearWidgetBrushis empty or not specified. I8300b - Update
getActiveWidgetsAPI to return the Container Type of the Widget. 2772eb1
API Changes
- Change Widget update API to take
WidgetInstanceIdand add helper for fetching IDs for a given widget. The new api throwsIllegalArgumentExceptionif the provided id is invalid or not owned by the caller. I6f3c5 b/446828899 - Add vertical and horizontal gradient in
WearWidgetBrush. If70ae b/470080675
API Changes
- Added
IconButtonAPI. I0f3dd b/481298420 - Genericized the type of the
StackStatesaver asSaver<StackState, *>. Ic164f b/491893461
Bug Fixes
- Updated Compose
compileSdkto API 37. This means that a minimum AGP version of 9.2.0 is required when using Compose. Id45cd b/413674743
Bug Fixes
- Update
JavaScriptEngineto 1.1.0-beta01 I7b63b
New Features
- Added check for calls to
mustRunAfterandshouldRunAfteras they are expensive due to Gradle having to rearrange the task graphs. - Added check for calls to
System.getenv()andSystem.getenv("key")that should be going through Provider API instead - External contribution from
josh@fueledbycaffeine.comto add a check to detect string concatenation of Provider
API Changes
- Deprecate
androidx.media. Use androidx.media3 instead.
1.1.0 is now stable!
Important changes since 1.0.0
Shared Elements between Scenes - Navigation3 now supports treating scenes as shared element object. This means that when the scenes change, it is possible to ensure they have a smooth transition. You can enable this by passing a SharedTransitionScope to either the NavDisplay or to rememberSceneState.
SceneDecoratorStrategy - Introduction of SceneDecoratorStrategy to support uses cases such as decorating scenes with common UI components or sharing state across scenes.
NavMetadata DSL - Navigation3 now provides a new type-safe metadata DSL. The DSL uses a new MetadataKey interface that allows for defining the key and value types that they wish to provide to the metadata map. This also added new NavMetadataKeys for NavDisplay transitions so that they can be used with the new metadata DSL to add transitions to NavDisplay.
OverlayScene Animations - The OverlayScene interface has a new onRemoved suspending callback. This callback is invoked after a key associated with the scene is removed from the backstack, but before it leaves composition. This allows exit animations called within onRemovedto complete before the overlay scene is removed from composition.
Other Changes - NavDisplay and rememberSceneState now take a List<SceneStrategy> instead of the previous single SceneStrategy parameter that was chained by the then infix. - You can now dynamically add metadata with consideration for the entry key via the EntryProvider DSL.
Bug Fixes
- Accessing
LocalNavAnimatedContentScopefrom anOverlayScenewill no longer cause anIllegalStateExceptionasOverlayScenesare now provided with a no-opLocalAnimatedContentScope. I2f00c b/486067688
Bug Fixes
- Updated Compose compileSdk to API 37. This means that a minimum AGP version of 9.2.0 is required when using Compose. Id45cd b/413674743
API Changes
- The
Flow<PagingData>.asStateAPI has been renamed toFlow<PagingData>.asItemSnapshotListFlowI0dc11 b/496548025
API Changes
- Add a
contentPaddingAPI toPdfViewercomposable. Idcfd4 b/481774503
Bug Fixes
- Updated Compose
compileSdkto API 37. This means that a minimum AGP version of 9.2.0 is required when using Compose. Id45cd b/413674743
New Features
- Promote the
CoreText,TextStyle,TextTransformandColorThemeOperations to the baseline AndroidX and Widgets Profiles I69671 b/494482597CoreTextprovides richer capabilities for rendering text, including adaptive text resizing, and improved control over text layout features like line breaking and overflow behavior.TextStyleallows common text styling attributes to be captured in the document once, and referenced by multiple text runs.TextTransformenables text transformations - for example, uppercasing text.
- Reverse rendering of items in horizontal layout when layout direction is RTL and not using Absolute horizontal arrangement. I2d38e
API Changes
- Prefer
toRemoteString(DecimalFormat)as the developer API. Ia4925 b/493924433 - Modifier
clip(shape, size)was removed. Modifierclip(shape)should be used instead. I76301
Bug Fixes
- Update
TextLookupto track array element changes. This ensures that expressions will be reevaluated if an element they look up in an array has changed I162c7
API Changes
- Make
RoomDatabase's no-arg constructor public to avoid a Lint warning when the constructor is referenced in the @Database declaration. I9bac2 b/494722261 - Add a version of
Room.inMemoryDatabaseBuilderandRoom.databaseBuilderthat doesn't take in an Android Context. The need for a Context has been greatly reduced in Room 3.0 and therefore making it an optional value for the Builder allows creating in-memory databases in common code more easily. I5d502 b/438041176
Bug Fixes
- Fix a 'code too large' error on JVM and Android generated code when the
onValidateSchemafunction's body was too big b/493708172.
API Changes
- Remove
openAsync(),prepareAsync()andstepAsync()from the common interfaces, keeping the suspend APIs only on the web source set interfaces. The suspend APIs are renamed, dropping the 'async' suffix since they no longer conflict with their blocking counterparts in the non-web source set. - The top-level suspend extension functions are moved into a new artifact
andriodx.sqlite:sqlite-asyncand a new packageandroidx.sqlite.async. This is done in order to avoid sub-optimal usages of these extension functions on common sources that do not target web. They should also be avoided if the targets are only web. However, if targeting both web and non-web platforms, then the top-level functions are useful and allow writing common code for all platforms that uses theSQLiteDriverinterfaces. I63c2c b/336758416 b/493837704
External Contribution
- Merge sqlite-ktx into the sqlite library. All Kotlin extensions are now part of the main sqlite artifact. sqlite-ktx is now an empty artifact for compatibility. Ib9512
New Features
- Refactored all public classes to provide more convenient, idiomatic Kotlin APIs for general usage, while maintaining strong Java interoperability.
API Changes
- Added a default zero-argument constructor to
FontShearSpanfor Java compatibility I73065 b/493692287. - Removed the
Parcelableimplementation inRubySpanandEmphasisSpanI49884 b/493693386. - Refactored
EmphasisSpanfor better compatibility I34c40 b/493693310. - Refactored
AnnotationPositionto improve API surface I10dce b/493693386. - Converted
TextOrientationto an enum class, refactoredAnnotationPositionto a sealed class, and removedRubySpan.BuilderIb4a77 b/493693386. - Added the
AnnotationPositionenum and refactored theRubySpanclass Ibfcff b/493692426. - Refactored
TextOrientationfor general usage and improved internal text scaling extensions I82152 b/493692428.
API Changes
TraceSinkfactory functions now returnTraceSinkand notAbstractTraceSink. Files now have a unique suffix. We make sure that we can atomically create a new file that will be used to store trace packets. I4c4aa b/496298726- Simplify and make coroutine context propagation faster. Ia62db
- Introduce the optional
attributes()when constructing aTraceDriverthat provides a way to add metadata pertaining to a trace. Ia147e
Bug Fixes
- Process threads and counter tracks are now synchronized. This fixes exceptions of the form:
java.lang.NullPointerException: Cannot invoke "androidx.tracing.ThreadTrack.flush$tracing()" because "threadTrack" is null - Avoid emitting sink events when tracing is disabled.
Bug Fixes
- Fixed an issue where item animations (via
Modifier.animateItem) stopped working inTransformingLazyColumn. I904ec b/493167084
API Changes
- Introduced new API for one-handed gestures, where prioritized callbacks may be registered for primary and dismiss actions. The system automatically identifies the most relevant on-screen target to ensure gestures and their indicators are only triggered for elements the user can currently see and interact with. Add
Modifier.oneHandedGestureto the composable associated with the gesture (e.g. Button) and useOneHandedGestureDefaults.GestureIndicatorto indicate to the user when the gesture action is available. Scrolling and paging can also be triggered with the primary gesture, withOneHandedGestureDefaults.scrollDownandOneHandedGestureDefaults.scrollToNextPagerecommended to be used in the callbacks.OneHandedGestureDefaults.ScrollGestureIndicatorandOneHandedGestureDefaults.VerticalPageGestureIndicatorare provided as alternatives toScrollIndicatorandPageIndicatorrespectively, to temporarily display a gesture indicator to the user. Ic6324 b/479098447 b/485488443 - Added
requestAnchorItemtoTransformingLazyColumnStateand introducedTransformingLazyColumnAnchorTypeto provide developers precise control over item expansion direction and layout anchoring. I0c1e6 b/494301025 - Added
isSwipeToRevealDualFlingThresholdEnabledflag, which is on by default, but can be disabled if bug fixes to swipe behavior inSwipeToRevealin this release cause a regression (in which case, please file a bug as soon as possible) Ie6db6 b/497743775
Bug Fixes
- Improved
SwipeToRevealto support fast flings, allowing users to fully reveal actions regardless of swipe distance (this change can be disabled by turning off isSwipeToRevealDualFlingThresholdEnabled flag). I833fd b/490728860 - Fixed
SwipeToRevealto trigger the full swipe when swiping over 75% of the screen width (this change can be disabled by turning offisSwipeToRevealDualFlingThresholdEnabledflag). Id5604 b/490728860 - Added a second haptic feedback for
SwipeToRevealwhen the swipe reaches the partial reveal state (this change can be disabled by turning offisSwipeToRevealDualFlingThresholdEnabledflag). Ic27e3 b/492273799 - Fixed an issue in
TransformingLazyColumnwhere item animations (Modifier.animateItem) stopped working. I904ec b/493167084 - Fixed a bug in
PickerGroup(and henceDatePicker) to prevent multiple touches causing intended scrolling on unselected Picker columns Id76c5 b/378646798
API Changes
- Expose
RemoteCircularProgressIndicator,RemoteProgressIndicatorDefaults, andRemoteProgressIndicatorColorsI64481 b/492476015 - Expose
RemoteTitleCardIc65ff b/492476015 - Expose
RemoteMaterialThemeI07329 b/492476015 - Expose
RemoteAppCardIb6fbc b/492476015 - Expose
RemoteCard,RemoteOutlinedCard,RemoteCardDefaults, andRemoteCardColorsI2bcfd b/492476015 - Expose
RemoteColorSchemeId0e88 b/492476015 - Expose
RemoteTypographyIb6f88 b/492476015 - Expose
RemoteShapesI6c356 b/492476015
Other Changes
- Updated Compose
compileSdkto API 37. This means that a minimum AGP version of 9.2.0 is required when using Compose. Id45cd b/413674743
Major features of 1.0.0:
- This is the first major release of Watch Face Push (read more).
- Watch Face Push is an API which allows a Wear OS app to add, update, or remove watch faces directly. It is designed to support use-cases where a user might select, create, or edit a watch face on their phone, and wish to add it to their connected watch.
New Features
- Add new
VersionCodesforWearApiVersionHelperI86bc1 b/487264133
API Changes
- The
CallbackExecutorargument toProfile.prefetchUrlAsyncis now nullable and defaults to the main thread if not provided. Ib89ef b/483041824