- Added a new LocalActivity composition local that provides the Activity for the current scope, removing the need to get an Activity from LocalContext
- Added a new lint rule that checks when LocalContext is incorrectly being cast to an Activity
- Activity Compose now depends on Compose Runtime 1.7.0 requirement raised · inferred, marked in the notes below
- PredictiveBackHandler no longer fires its callback after the handler has been disabled, fixing an IndexOutOfBoundsException thrown by the NavHost from Navigation Compose
1 change to check, marked in the notes below
From AndroidX Activity
API Changes Added a new LocalActivity composition local that provides the Activity for the current scope, removing the need for developers to get an Activity from the LocalContext. It also comes with a new lint rule that checks when the LocalContext is incorrectly being cast to an Activity. ( I7746a, b/283009666) Bug Fixes From Activity 1.9.3: PredictiveBackHandler will no longer fire it's callback after the handler has been disabled. This will fix an issue where the NavHost from Navigation Compose would throw an IndexOutOfBoundsException. ( I3f75e, b/365027664, b/340202286) Dependency Update Activity Compose now depends on Compose Runtime 1.7.0 ( I7746a, b/283009666) requirement raised · inferred