Merge pull request #1707 from google/ben/deprecations
Deprecate SystemUIController, Theme Adapters, Pager Indicators, WebView
diff --git a/README.md b/README.md
index fa9b178..928e5df 100644
--- a/README.md
+++ b/README.md
@@ -40,18 +40,6 @@
## Libraries
-### 🍫 [System UI Controller](./systemuicontroller/)
-A library that provides easy-to-use utilities for recoloring the Android system bars from Jetpack Compose.
-
-### 🎨 [AppCompat Theme Adapter](./themeadapter-appcompat/)
-A library that enables the reuse of [AppCompat][appcompat] XML themes, for theming in Jetpack Compose.
-
-### 🎨 [Material Theme Adapter](./themeadapter-material/)
-A library that enables the reuse of [MDC-Android][mdc] Material 2 XML themes, for theming in Jetpack Compose.
-
-### 🎨 [Material 3 Theme Adapter](./themeadapter-material3/)
-A library that enables the reuse of [MDC-Android][mdc] Material 3 XML themes, for theming in Jetpack Compose.
-
### 📫 [Permissions](./permissions/)
A library that provides [Android runtime permissions][runtimepermissions] support for Jetpack Compose.
@@ -61,9 +49,6 @@
### 🖌️ [Drawable Painter](./drawablepainter/)
A library which provides a way to use Android Drawables as Jetpack Compose Painters.
-### 🌏 [Web](./web/)
-A wrapper around WebView for basic WebView support in Jetpack Compose.
-
### 📜 [Adaptive](./adaptive/)
A library providing a collection of utilities for adaptive layouts.
@@ -88,6 +73,21 @@
### ⏳ [Placeholder](./placeholder/) (Deprecated)
A library that provides easy-to-use modifiers for displaying a placeholder UI while content is loading.
+### 🍫 [System UI Controller](./systemuicontroller/) (Deprecated)
+A library that provides easy-to-use utilities for recoloring the Android system bars from Jetpack Compose.
+
+### 🎨 [AppCompat Theme Adapter](./themeadapter-appcompat/) (Deprecated)
+A library that enables the reuse of [AppCompat][appcompat] XML themes, for theming in Jetpack Compose.
+
+### 🎨 [Material Theme Adapter](./themeadapter-material/) (Deprecated)
+A library that enables the reuse of [MDC-Android][mdc] Material 2 XML themes, for theming in Jetpack Compose.
+
+### 🎨 [Material 3 Theme Adapter](./themeadapter-material3/) (Deprecated)
+A library that enables the reuse of [MDC-Android][mdc] Material 3 XML themes, for theming in Jetpack Compose.
+
+### 🌏 [Web](./web/) (Deprecated)
+A wrapper around WebView for basic WebView support in Jetpack Compose.
+
### 📐 [Insets](./insets/) (Deprecated & Removed)
See our [Migration Guide](https://google.github.io/accompanist/insets/) for migrating to Insets in Compose.
diff --git a/docs/systemuicontroller.md b/docs/systemuicontroller.md
index 9c891f3..7f71dad 100644
--- a/docs/systemuicontroller.md
+++ b/docs/systemuicontroller.md
@@ -2,6 +2,15 @@
[](https://search.maven.org/search?q=g:com.google.accompanist)
+!!! warning
+**This library is deprecated, and the API is no longer maintained. We recommend forking the implementation and customising it to your needs.** The original documentation is below.
+
+## Migration
+Recommendation: If you were using SystemUIController to go edge-to-edge in your activity and change the system bar colors and system bar icon colors, use the new [Activity.enableEdgeToEdge](https://developer.android.com/reference/androidx/activity/ComponentActivity#(androidx.activity.ComponentActivity).enableEdgeToEdge(androidx.activity.SystemBarStyle,androidx.activity.SystemBarStyle)) method available in androidx.activity 1.8.0-alpha03 and later. This method backports the scrims used on some versions of Android. [This](https://github.com/android/nowinandroid/pull/817) is a sample PR of the migration to the new method and removing the dependency on SystemUIController in Now in Android.
+
+For other usages, migrate to using WindowInsetsControllerCompat or window APIs directly.
+
+## Original Documentation
System UI Controller provides easy-to-use utilities for updating the System UI bar colors within Jetpack Compose.
## Usage
diff --git a/docs/themeadapter-appcompat.md b/docs/themeadapter-appcompat.md
index 6b1ef3d..8f23e9f 100644
--- a/docs/themeadapter-appcompat.md
+++ b/docs/themeadapter-appcompat.md
@@ -2,6 +2,16 @@
[](https://search.maven.org/search?q=g:com.google.accompanist)
+!!! warning
+**This library is deprecated, and the API is no longer maintained.** The original documentation is below.
+
+## Migration
+Recommendation: Use the [Material Theme Builder](https://m3.material.io/theme-builder) tool, or an alternative design tool, to generate a matching XML and Compose theme implementation for your app. See [Migrating XML themes to Compose](https://developer.android.com/jetpack/compose/designsystems/views-to-compose) to learn more.
+
+You can checkout [Material Design 3 in Compose](https://developer.android.com/jetpack/compose/designsystems/material3#material-theming) to learn more about creating and adding theme to your app using Material Theme Builder.
+
+## Original Documenation
+
A library that enables the reuse of [AppCompat][appcompat] XML themes, for theming in [Jetpack Compose][compose].
The basis of theming in [Jetpack Compose][compose] is the [`MaterialTheme`][materialtheme] composable, where you provide [`Colors`][colors], [`Shapes`][shapes] and [`Typography`][typography] instances containing your styling parameters:
diff --git a/docs/themeadapter-core.md b/docs/themeadapter-core.md
index b7e8044..91d06f6 100644
--- a/docs/themeadapter-core.md
+++ b/docs/themeadapter-core.md
@@ -2,6 +2,16 @@
[](https://search.maven.org/search?q=g:com.google.accompanist)
+!!! warning
+**This library is deprecated, and the API is no longer maintained.** The original documentation is below.
+
+## Migration
+Recommendation: Use the [Material Theme Builder](https://m3.material.io/theme-builder) tool, or an alternative design tool, to generate a matching XML and Compose theme implementation for your app. See [Migrating XML themes to Compose](https://developer.android.com/jetpack/compose/designsystems/views-to-compose) to learn more.
+
+You can checkout [Material Design 3 in Compose](https://developer.android.com/jetpack/compose/designsystems/material3#material-theming) to learn more about creating and adding theme to your app using Material Theme Builder.
+
+## Original Documenation
+
A library that includes common utilities that enable the reuse of XML themes, for theming in [Jetpack Compose][compose].
See the [API][api] for more details.
diff --git a/docs/themeadapter-material.md b/docs/themeadapter-material.md
index ef4c99d..998cd08 100644
--- a/docs/themeadapter-material.md
+++ b/docs/themeadapter-material.md
@@ -2,6 +2,16 @@
[](https://search.maven.org/search?q=g:com.google.accompanist)
+!!! warning
+**This library is deprecated, and the API is no longer maintained.** The original documentation is below.
+
+## Migration
+Recommendation: Use the [Material Theme Builder](https://m3.material.io/theme-builder) tool, or an alternative design tool, to generate a matching XML and Compose theme implementation for your app. See [Migrating XML themes to Compose](https://developer.android.com/jetpack/compose/designsystems/views-to-compose) to learn more.
+
+You can checkout [Material Design 3 in Compose](https://developer.android.com/jetpack/compose/designsystems/material3#material-theming) to learn more about creating and adding theme to your app using Material Theme Builder.
+
+## Original Documenation
+
A library that enables the reuse of [MDC-Android][mdc] Material 2 XML themes, for theming in [Jetpack Compose][compose].

diff --git a/docs/themeadapter-material3.md b/docs/themeadapter-material3.md
index 1ffb591..eb04478 100644
--- a/docs/themeadapter-material3.md
+++ b/docs/themeadapter-material3.md
@@ -2,6 +2,15 @@
[](https://search.maven.org/search?q=g:com.google.accompanist)
+!!! warning
+**This library is deprecated, and the API is no longer maintained. We recommend generating a theme with [Material Theme Builder](https://m3.material.io/theme-builder)** The original documentation is below.
+
+## Migration
+Recommendation: Use the [Material Theme Builder](https://m3.material.io/theme-builder) tool, or an alternative design tool, to generate a matching XML and Compose theme implementation for your app. See [Migrating XML themes to Compose](https://developer.android.com/jetpack/compose/designsystems/views-to-compose) to learn more.
+
+You can checkout [Material Design 3 in Compose](https://developer.android.com/jetpack/compose/designsystems/material3#material-theming) to learn more about creating and adding theme to your app using Material Theme Builder.
+
+## Original Documenation
A library that enables the reuse of [MDC-Android][mdc] Material 3 XML themes, for theming in [Jetpack Compose][compose].

diff --git a/docs/web.md b/docs/web.md
index 948eb2a..0df40b7 100644
--- a/docs/web.md
+++ b/docs/web.md
@@ -4,6 +4,9 @@
A library which provides a Jetpack Compose wrapper around Android's WebView.
+!!! warning
+**This library is deprecated, and the API is no longer maintained. We recommend forking the implementation and customising it to your needs.** The original documentation is below.
+
## Usage
To implement this wrapper there are two key APIs which are needed: [`WebView`](../api/web/com.google.accompanist.web/-web-view.html), which is provides the layout, and [`rememberWebViewState(url)`](../api/web/com.google.accompanist.web/remember-web-view-state.html) which provides some remembered state including the URL to display.
diff --git a/insets-ui/api/current.api b/insets-ui/api/current.api
index e7e7318..0bdcf16 100644
--- a/insets-ui/api/current.api
+++ b/insets-ui/api/current.api
@@ -2,21 +2,21 @@
package com.google.accompanist.insets.ui {
public final class BottomNavigationKt {
- method @androidx.compose.runtime.Composable public static void BottomNavigation(optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional long backgroundColor, optional long contentColor, optional float elevation, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void BottomNavigationContent(optional androidx.compose.ui.Modifier modifier, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
- method @androidx.compose.runtime.Composable public static void BottomNavigationSurface(optional androidx.compose.ui.Modifier modifier, optional long backgroundColor, optional long contentColor, optional float elevation, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @Deprecated @androidx.compose.runtime.Composable public static void BottomNavigation(optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional long backgroundColor, optional long contentColor, optional float elevation, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @Deprecated @androidx.compose.runtime.Composable public static void BottomNavigationContent(optional androidx.compose.ui.Modifier modifier, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> content);
+ method @Deprecated @androidx.compose.runtime.Composable public static void BottomNavigationSurface(optional androidx.compose.ui.Modifier modifier, optional long backgroundColor, optional long contentColor, optional float elevation, kotlin.jvm.functions.Function0<kotlin.Unit> content);
}
public final class ScaffoldKt {
- method @androidx.compose.runtime.Composable public static void Scaffold(optional androidx.compose.ui.Modifier modifier, optional androidx.compose.material.ScaffoldState scaffoldState, optional kotlin.jvm.functions.Function0<kotlin.Unit> topBar, optional kotlin.jvm.functions.Function0<kotlin.Unit> bottomBar, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.SnackbarHostState,kotlin.Unit> snackbarHost, optional kotlin.jvm.functions.Function0<kotlin.Unit> floatingActionButton, optional int floatingActionButtonPosition, optional boolean isFloatingActionButtonDocked, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit>? drawerContent, optional boolean drawerGesturesEnabled, optional androidx.compose.ui.graphics.Shape drawerShape, optional float drawerElevation, optional long drawerBackgroundColor, optional long drawerContentColor, optional long drawerScrimColor, optional long backgroundColor, optional long contentColor, optional androidx.compose.foundation.layout.PaddingValues contentPadding, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.PaddingValues,kotlin.Unit> content);
+ method @Deprecated @androidx.compose.runtime.Composable public static void Scaffold(optional androidx.compose.ui.Modifier modifier, optional androidx.compose.material.ScaffoldState scaffoldState, optional kotlin.jvm.functions.Function0<kotlin.Unit> topBar, optional kotlin.jvm.functions.Function0<kotlin.Unit> bottomBar, optional kotlin.jvm.functions.Function1<? super androidx.compose.material.SnackbarHostState,kotlin.Unit> snackbarHost, optional kotlin.jvm.functions.Function0<kotlin.Unit> floatingActionButton, optional int floatingActionButtonPosition, optional boolean isFloatingActionButtonDocked, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.ColumnScope,kotlin.Unit>? drawerContent, optional boolean drawerGesturesEnabled, optional androidx.compose.ui.graphics.Shape drawerShape, optional float drawerElevation, optional long drawerBackgroundColor, optional long drawerContentColor, optional long drawerScrimColor, optional long backgroundColor, optional long contentColor, optional androidx.compose.foundation.layout.PaddingValues contentPadding, kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.PaddingValues,kotlin.Unit> content);
method public static androidx.compose.runtime.ProvidableCompositionLocal<androidx.compose.foundation.layout.PaddingValues> getLocalScaffoldPadding();
property public static final androidx.compose.runtime.ProvidableCompositionLocal<androidx.compose.foundation.layout.PaddingValues> LocalScaffoldPadding;
}
public final class TopAppBarKt {
- method @androidx.compose.runtime.Composable public static void TopAppBar(kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function0<kotlin.Unit>? navigationIcon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> actions, optional long backgroundColor, optional long contentColor, optional float elevation);
- method @androidx.compose.runtime.Composable public static void TopAppBarContent(kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? navigationIcon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> actions);
- method @androidx.compose.runtime.Composable public static void TopAppBarSurface(optional androidx.compose.ui.Modifier modifier, optional long backgroundColor, optional long contentColor, optional float elevation, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @Deprecated @androidx.compose.runtime.Composable public static void TopAppBar(kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function0<kotlin.Unit>? navigationIcon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> actions, optional long backgroundColor, optional long contentColor, optional float elevation);
+ method @Deprecated @androidx.compose.runtime.Composable public static void TopAppBarContent(kotlin.jvm.functions.Function0<kotlin.Unit> title, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0<kotlin.Unit>? navigationIcon, optional kotlin.jvm.functions.Function1<? super androidx.compose.foundation.layout.RowScope,kotlin.Unit> actions);
+ method @Deprecated @androidx.compose.runtime.Composable public static void TopAppBarSurface(optional androidx.compose.ui.Modifier modifier, optional long backgroundColor, optional long contentColor, optional float elevation, kotlin.jvm.functions.Function0<kotlin.Unit> content);
}
}
diff --git a/pager-indicators/api/current.api b/pager-indicators/api/current.api
index cfa4a13..aabbca7 100644
--- a/pager-indicators/api/current.api
+++ b/pager-indicators/api/current.api
@@ -3,14 +3,14 @@
public final class PagerIndicatorKt {
method @Deprecated @androidx.compose.runtime.Composable public static void HorizontalPagerIndicator(com.google.accompanist.pager.PagerState pagerState, optional androidx.compose.ui.Modifier modifier, optional int pageCount, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> pageIndexMapping, optional long activeColor, optional long inactiveColor, optional float indicatorWidth, optional float indicatorHeight, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape);
- method @androidx.compose.runtime.Composable public static void HorizontalPagerIndicator(androidx.compose.foundation.pager.PagerState pagerState, int pageCount, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> pageIndexMapping, optional long activeColor, optional long inactiveColor, optional float indicatorWidth, optional float indicatorHeight, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape);
+ method @Deprecated @androidx.compose.runtime.Composable public static void HorizontalPagerIndicator(androidx.compose.foundation.pager.PagerState pagerState, int pageCount, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> pageIndexMapping, optional long activeColor, optional long inactiveColor, optional float indicatorWidth, optional float indicatorHeight, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape);
method @Deprecated @androidx.compose.runtime.Composable public static void VerticalPagerIndicator(com.google.accompanist.pager.PagerState pagerState, optional androidx.compose.ui.Modifier modifier, optional int pageCount, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> pageIndexMapping, optional long activeColor, optional long inactiveColor, optional float indicatorHeight, optional float indicatorWidth, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape);
- method @androidx.compose.runtime.Composable public static void VerticalPagerIndicator(androidx.compose.foundation.pager.PagerState pagerState, int pageCount, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> pageIndexMapping, optional long activeColor, optional long inactiveColor, optional float indicatorHeight, optional float indicatorWidth, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape);
+ method @Deprecated @androidx.compose.runtime.Composable public static void VerticalPagerIndicator(androidx.compose.foundation.pager.PagerState pagerState, int pageCount, optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> pageIndexMapping, optional long activeColor, optional long inactiveColor, optional float indicatorHeight, optional float indicatorWidth, optional float spacing, optional androidx.compose.ui.graphics.Shape indicatorShape);
}
public final class PagerTabKt {
method @Deprecated @com.google.accompanist.pager.ExperimentalPagerApi public static androidx.compose.ui.Modifier pagerTabIndicatorOffset(androidx.compose.ui.Modifier, com.google.accompanist.pager.PagerState pagerState, java.util.List<androidx.compose.material.TabPosition> tabPositions, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> pageIndexMapping);
- method public static androidx.compose.ui.Modifier pagerTabIndicatorOffset(androidx.compose.ui.Modifier, androidx.compose.foundation.pager.PagerState pagerState, java.util.List<androidx.compose.material.TabPosition> tabPositions, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> pageIndexMapping);
+ method @Deprecated public static androidx.compose.ui.Modifier pagerTabIndicatorOffset(androidx.compose.ui.Modifier, androidx.compose.foundation.pager.PagerState pagerState, java.util.List<androidx.compose.material.TabPosition> tabPositions, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer> pageIndexMapping);
}
}
diff --git a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt
index 0d11656..b544fbf 100644
--- a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt
+++ b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerIndicator.kt
@@ -136,6 +136,13 @@
* @param spacing the spacing between each indicator in [Dp].
* @param indicatorShape the shape representing each indicator. This defaults to [CircleShape].
*/
+@Deprecated(
+ """
+ PagerIndicator for is deprecated, we recommend forking this implementation and
+ customising for your needs.
+For more migration information, please visit https://google.github.io/accompanist/pager/
+"""
+)
@OptIn(ExperimentalFoundationApi::class)
@Composable
public fun HorizontalPagerIndicator(
@@ -330,6 +337,13 @@
* @param spacing the spacing between each indicator in [Dp].
* @param indicatorShape the shape representing each indicator. This defaults to [CircleShape].
*/
+@Deprecated(
+ """
+ PagerIndicator for is deprecated, we recommend forking this implementation and
+ customising for your needs.
+For more migration information, please visit https://google.github.io/accompanist/pager/
+"""
+)
@OptIn(ExperimentalFoundationApi::class)
@Composable
public fun VerticalPagerIndicator(
diff --git a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerTab.kt b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerTab.kt
index 2a1fd50..072675c 100644
--- a/pager-indicators/src/main/java/com/google/accompanist/pager/PagerTab.kt
+++ b/pager-indicators/src/main/java/com/google/accompanist/pager/PagerTab.kt
@@ -60,6 +60,13 @@
* [androidx.compose.foundation.pager.VerticalPager].
*/
@OptIn(ExperimentalFoundationApi::class)
+@Deprecated(
+ """
+ pagerTabIndicatorOffset for accompanist Pagers are deprecated, please use the version that takes
+ androidx.compose.foundation.pager.PagerState instead
+For more migration information, please visit https://google.github.io/accompanist/pager/#migration
+"""
+)
public fun Modifier.pagerTabIndicatorOffset(
pagerState: androidx.compose.foundation.pager.PagerState,
tabPositions: List<TabPosition>,
diff --git a/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/DialogSystemBarsColorSample.kt b/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/DialogSystemBarsColorSample.kt
index 9601fad..d1006cf 100644
--- a/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/DialogSystemBarsColorSample.kt
+++ b/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/DialogSystemBarsColorSample.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.sample.systemuicontroller
import android.os.Bundle
diff --git a/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/DocsSamples.kt b/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/DocsSamples.kt
index ad51f9c..3ffb7df 100644
--- a/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/DocsSamples.kt
+++ b/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/DocsSamples.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.sample.systemuicontroller
import androidx.compose.foundation.isSystemInDarkTheme
diff --git a/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/SystemBarsColorSample.kt b/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/SystemBarsColorSample.kt
index 0b4b522..cec918c 100644
--- a/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/SystemBarsColorSample.kt
+++ b/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/SystemBarsColorSample.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.sample.systemuicontroller
import android.os.Bundle
diff --git a/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/SystemBarsVisibilitySample.kt b/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/SystemBarsVisibilitySample.kt
index ee0370d..287b930 100644
--- a/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/SystemBarsVisibilitySample.kt
+++ b/sample/src/main/java/com/google/accompanist/sample/systemuicontroller/SystemBarsVisibilitySample.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.sample.systemuicontroller
import android.os.Bundle
diff --git a/sample/src/main/java/com/google/accompanist/sample/themeadapter/Material3Sample.kt b/sample/src/main/java/com/google/accompanist/sample/themeadapter/Material3Sample.kt
index 57b98d7..14598aa 100644
--- a/sample/src/main/java/com/google/accompanist/sample/themeadapter/Material3Sample.kt
+++ b/sample/src/main/java/com/google/accompanist/sample/themeadapter/Material3Sample.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.sample.themeadapter
import android.os.Bundle
diff --git a/sample/src/main/java/com/google/accompanist/sample/themeadapter/MaterialSample.kt b/sample/src/main/java/com/google/accompanist/sample/themeadapter/MaterialSample.kt
index cf66c8c..8304d62 100644
--- a/sample/src/main/java/com/google/accompanist/sample/themeadapter/MaterialSample.kt
+++ b/sample/src/main/java/com/google/accompanist/sample/themeadapter/MaterialSample.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.sample.themeadapter
import android.os.Bundle
diff --git a/sample/src/main/java/com/google/accompanist/sample/webview/BasicWebViewSample.kt b/sample/src/main/java/com/google/accompanist/sample/webview/BasicWebViewSample.kt
index 1be89d4..a47fc1f 100644
--- a/sample/src/main/java/com/google/accompanist/sample/webview/BasicWebViewSample.kt
+++ b/sample/src/main/java/com/google/accompanist/sample/webview/BasicWebViewSample.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.sample.webview
import android.annotation.SuppressLint
diff --git a/sample/src/main/java/com/google/accompanist/sample/webview/WebViewSaveStateSample.kt b/sample/src/main/java/com/google/accompanist/sample/webview/WebViewSaveStateSample.kt
index dcfba3b..a8656c7 100644
--- a/sample/src/main/java/com/google/accompanist/sample/webview/WebViewSaveStateSample.kt
+++ b/sample/src/main/java/com/google/accompanist/sample/webview/WebViewSaveStateSample.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.sample.webview
import android.os.Bundle
diff --git a/sample/src/main/java/com/google/accompanist/sample/webview/WrappedContentWebViewSample.kt b/sample/src/main/java/com/google/accompanist/sample/webview/WrappedContentWebViewSample.kt
index 25c945a..f2ac4b7 100644
--- a/sample/src/main/java/com/google/accompanist/sample/webview/WrappedContentWebViewSample.kt
+++ b/sample/src/main/java/com/google/accompanist/sample/webview/WrappedContentWebViewSample.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.sample.webview
import android.os.Bundle
diff --git a/systemuicontroller/api/current.api b/systemuicontroller/api/current.api
index b0000e3..7cc3b3d 100644
--- a/systemuicontroller/api/current.api
+++ b/systemuicontroller/api/current.api
@@ -1,26 +1,26 @@
// Signature format: 4.0
package com.google.accompanist.systemuicontroller {
- @androidx.compose.runtime.Stable public interface SystemUiController {
- method public boolean getNavigationBarDarkContentEnabled();
- method public boolean getStatusBarDarkContentEnabled();
- method public int getSystemBarsBehavior();
- method public default boolean getSystemBarsDarkContentEnabled();
- method public boolean isNavigationBarContrastEnforced();
- method public boolean isNavigationBarVisible();
- method public boolean isStatusBarVisible();
- method public default boolean isSystemBarsVisible();
- method public void setNavigationBarColor(long color, optional boolean darkIcons, optional boolean navigationBarContrastEnforced, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color> transformColorForLightContent);
- method public void setNavigationBarContrastEnforced(boolean);
- method public void setNavigationBarDarkContentEnabled(boolean);
- method public void setNavigationBarVisible(boolean);
- method public void setStatusBarColor(long color, optional boolean darkIcons, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color> transformColorForLightContent);
- method public void setStatusBarDarkContentEnabled(boolean);
- method public void setStatusBarVisible(boolean);
- method public void setSystemBarsBehavior(int);
- method public default void setSystemBarsColor(long color, optional boolean darkIcons, optional boolean isNavigationBarContrastEnforced, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color> transformColorForLightContent);
- method public default void setSystemBarsDarkContentEnabled(boolean);
- method public default void setSystemBarsVisible(boolean);
+ @Deprecated @androidx.compose.runtime.Stable public interface SystemUiController {
+ method @Deprecated public boolean getNavigationBarDarkContentEnabled();
+ method @Deprecated public boolean getStatusBarDarkContentEnabled();
+ method @Deprecated public int getSystemBarsBehavior();
+ method @Deprecated public default boolean getSystemBarsDarkContentEnabled();
+ method @Deprecated public boolean isNavigationBarContrastEnforced();
+ method @Deprecated public boolean isNavigationBarVisible();
+ method @Deprecated public boolean isStatusBarVisible();
+ method @Deprecated public default boolean isSystemBarsVisible();
+ method @Deprecated public void setNavigationBarColor(long color, optional boolean darkIcons, optional boolean navigationBarContrastEnforced, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color> transformColorForLightContent);
+ method @Deprecated public void setNavigationBarContrastEnforced(boolean);
+ method @Deprecated public void setNavigationBarDarkContentEnabled(boolean);
+ method @Deprecated public void setNavigationBarVisible(boolean);
+ method @Deprecated public void setStatusBarColor(long color, optional boolean darkIcons, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color> transformColorForLightContent);
+ method @Deprecated public void setStatusBarDarkContentEnabled(boolean);
+ method @Deprecated public void setStatusBarVisible(boolean);
+ method @Deprecated public void setSystemBarsBehavior(int);
+ method @Deprecated public default void setSystemBarsColor(long color, optional boolean darkIcons, optional boolean isNavigationBarContrastEnforced, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color> transformColorForLightContent);
+ method @Deprecated public default void setSystemBarsDarkContentEnabled(boolean);
+ method @Deprecated public default void setSystemBarsVisible(boolean);
property public abstract boolean isNavigationBarContrastEnforced;
property public abstract boolean isNavigationBarVisible;
property public abstract boolean isStatusBarVisible;
@@ -32,7 +32,7 @@
}
public final class SystemUiControllerKt {
- method @androidx.compose.runtime.Composable public static com.google.accompanist.systemuicontroller.SystemUiController rememberSystemUiController(optional android.view.Window? window);
+ method @Deprecated @androidx.compose.runtime.Composable public static com.google.accompanist.systemuicontroller.SystemUiController rememberSystemUiController(optional android.view.Window? window);
}
}
diff --git a/systemuicontroller/src/main/java/com/google/accompanist/systemuicontroller/SystemUiController.kt b/systemuicontroller/src/main/java/com/google/accompanist/systemuicontroller/SystemUiController.kt
index 3a3ad89..acc1a1d 100644
--- a/systemuicontroller/src/main/java/com/google/accompanist/systemuicontroller/SystemUiController.kt
+++ b/systemuicontroller/src/main/java/com/google/accompanist/systemuicontroller/SystemUiController.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.systemuicontroller
import android.app.Activity
@@ -42,6 +44,13 @@
*
* @sample com.google.accompanist.sample.systemuicontroller.SystemUiControllerSample
*/
+@Deprecated(
+ """
+accompanist/systemuicontroller is deprecated and the API is no longer maintained.
+We recommend going edge to edge using Activity.enableEdgeToEdge in androidx.activity.
+For more information please visit https://google.github.io/accompanist/systemuicontroller
+"""
+)
@Stable
public interface SystemUiController {
@@ -180,6 +189,13 @@
* If none of these are found (such as may happen in a preview), then the functionality of the
* returned [SystemUiController] will be degraded, but won't throw an exception.
*/
+@Deprecated(
+ """
+accompanist/systemuicontroller is deprecated and the API is no longer maintained.
+We recommend going edge to edge using EdgeToEdge.enableEdgeToEdge in androidx.activity.
+For more information please visit https://google.github.io/accompanist/systemuicontroller
+"""
+)
@Composable
public fun rememberSystemUiController(
window: Window? = findWindow(),
diff --git a/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/ActivityRememberSystemUiControllerTest.kt b/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/ActivityRememberSystemUiControllerTest.kt
index d50dcbc..f90ed7a 100644
--- a/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/ActivityRememberSystemUiControllerTest.kt
+++ b/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/ActivityRememberSystemUiControllerTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.systemuicontroller
import android.os.Build
diff --git a/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/ActivitySystemUiControllerTest.kt b/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/ActivitySystemUiControllerTest.kt
index 90d0483..58cf21a 100644
--- a/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/ActivitySystemUiControllerTest.kt
+++ b/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/ActivitySystemUiControllerTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.systemuicontroller
import android.os.Build
diff --git a/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/DialogRememberSystemUiControllerTest.kt b/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/DialogRememberSystemUiControllerTest.kt
index 10cb2d8..72c7594 100644
--- a/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/DialogRememberSystemUiControllerTest.kt
+++ b/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/DialogRememberSystemUiControllerTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.systemuicontroller
import android.os.Build
diff --git a/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/DialogSystemUiControllerTest.kt b/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/DialogSystemUiControllerTest.kt
index c7fe002..eb6eab2 100644
--- a/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/DialogSystemUiControllerTest.kt
+++ b/systemuicontroller/src/sharedTest/kotlin/com/google/accompanist/systemuicontroller/DialogSystemUiControllerTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.systemuicontroller
import android.app.Dialog
diff --git a/themeadapter-appcompat/api/current.api b/themeadapter-appcompat/api/current.api
index 26e84d3..bb8ecb4 100644
--- a/themeadapter-appcompat/api/current.api
+++ b/themeadapter-appcompat/api/current.api
@@ -2,20 +2,20 @@
package com.google.accompanist.themeadapter.appcompat {
public final class AppCompatTheme {
- method @androidx.compose.runtime.Composable public static void AppCompatTheme(optional android.content.Context context, optional boolean readColors, optional boolean readTypography, optional androidx.compose.material.Shapes shapes, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method public static com.google.accompanist.themeadapter.appcompat.ThemeParameters createAppCompatTheme(android.content.Context, optional boolean readColors, optional boolean readTypography);
+ method @Deprecated @androidx.compose.runtime.Composable public static void AppCompatTheme(optional android.content.Context context, optional boolean readColors, optional boolean readTypography, optional androidx.compose.material.Shapes shapes, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @Deprecated public static com.google.accompanist.themeadapter.appcompat.ThemeParameters createAppCompatTheme(android.content.Context, optional boolean readColors, optional boolean readTypography);
}
public final class ColorKt {
}
- public final class ThemeParameters {
- ctor public ThemeParameters(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography);
- method public androidx.compose.material.Colors? component1();
- method public androidx.compose.material.Typography? component2();
- method public com.google.accompanist.themeadapter.appcompat.ThemeParameters copy(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography);
- method public androidx.compose.material.Colors? getColors();
- method public androidx.compose.material.Typography? getTypography();
+ @Deprecated public final class ThemeParameters {
+ ctor @Deprecated public ThemeParameters(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography);
+ method @Deprecated public androidx.compose.material.Colors? component1();
+ method @Deprecated public androidx.compose.material.Typography? component2();
+ method @Deprecated public com.google.accompanist.themeadapter.appcompat.ThemeParameters copy(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography);
+ method @Deprecated public androidx.compose.material.Colors? getColors();
+ method @Deprecated public androidx.compose.material.Typography? getTypography();
property public final androidx.compose.material.Colors? colors;
property public final androidx.compose.material.Typography? typography;
}
diff --git a/themeadapter-appcompat/src/androidTest/kotlin/com/google/accompanist/themeadapter/appcompat/InstrumentedAppCompatThemeTest.kt b/themeadapter-appcompat/src/androidTest/kotlin/com/google/accompanist/themeadapter/appcompat/InstrumentedAppCompatThemeTest.kt
index 6c19b5d..a8ae3e7 100644
--- a/themeadapter-appcompat/src/androidTest/kotlin/com/google/accompanist/themeadapter/appcompat/InstrumentedAppCompatThemeTest.kt
+++ b/themeadapter-appcompat/src/androidTest/kotlin/com/google/accompanist/themeadapter/appcompat/InstrumentedAppCompatThemeTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.appcompat
import androidx.appcompat.app.AppCompatActivity
diff --git a/themeadapter-appcompat/src/main/java/com/google/accompanist/themeadapter/appcompat/AppCompatTheme.kt b/themeadapter-appcompat/src/main/java/com/google/accompanist/themeadapter/appcompat/AppCompatTheme.kt
index c72657e..c10b7ec 100644
--- a/themeadapter-appcompat/src/main/java/com/google/accompanist/themeadapter/appcompat/AppCompatTheme.kt
+++ b/themeadapter-appcompat/src/main/java/com/google/accompanist/themeadapter/appcompat/AppCompatTheme.kt
@@ -15,6 +15,7 @@
*/
@file:JvmName("AppCompatTheme")
+@file:Suppress("DEPRECATION")
package com.google.accompanist.themeadapter.appcompat
@@ -98,6 +99,12 @@
* @param readTypography whether to read the font family from [context]'s theme.
* @param shapes A set of shapes to be used by the components in this hierarchy.
*/
+@Deprecated(
+ """
+ AppCompat ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
@Composable
public fun AppCompatTheme(
context: Context = LocalContext.current,
@@ -131,6 +138,12 @@
* This class contains some of the individual components of a [MaterialTheme]:
* [Colors] & [Typography].
*/
+@Deprecated(
+ """
+ AppCompat ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
public data class ThemeParameters(
val colors: Colors?,
val typography: Typography?
@@ -150,6 +163,13 @@
*
* @return [ThemeParameters] instance containing the resulting [Colors] and [Typography]
*/
+
+@Deprecated(
+ """
+ AppCompat ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
public fun Context.createAppCompatTheme(
readColors: Boolean = true,
readTypography: Boolean = true
diff --git a/themeadapter-appcompat/src/sharedTest/kotlin/com/google/accompanist/themeadapter/appcompat/BaseAppCompatThemeTest.kt b/themeadapter-appcompat/src/sharedTest/kotlin/com/google/accompanist/themeadapter/appcompat/BaseAppCompatThemeTest.kt
index e5a9e16..2f76998 100644
--- a/themeadapter-appcompat/src/sharedTest/kotlin/com/google/accompanist/themeadapter/appcompat/BaseAppCompatThemeTest.kt
+++ b/themeadapter-appcompat/src/sharedTest/kotlin/com/google/accompanist/themeadapter/appcompat/BaseAppCompatThemeTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.appcompat
import android.view.ContextThemeWrapper
diff --git a/themeadapter-appcompat/src/sharedTest/kotlin/com/google/accompanist/themeadapter/appcompat/NotAppCompatThemeTest.kt b/themeadapter-appcompat/src/sharedTest/kotlin/com/google/accompanist/themeadapter/appcompat/NotAppCompatThemeTest.kt
index 19bb865..4aa5f0f 100644
--- a/themeadapter-appcompat/src/sharedTest/kotlin/com/google/accompanist/themeadapter/appcompat/NotAppCompatThemeTest.kt
+++ b/themeadapter-appcompat/src/sharedTest/kotlin/com/google/accompanist/themeadapter/appcompat/NotAppCompatThemeTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.appcompat
import androidx.compose.ui.test.junit4.createAndroidComposeRule
diff --git a/themeadapter-core/api/current.api b/themeadapter-core/api/current.api
index 19d5373..04698c0 100644
--- a/themeadapter-core/api/current.api
+++ b/themeadapter-core/api/current.api
@@ -1,25 +1,25 @@
// Signature format: 4.0
package com.google.accompanist.themeadapter.core {
- public final class FontFamilyWithWeight {
- ctor public FontFamilyWithWeight(androidx.compose.ui.text.font.FontFamily fontFamily, optional androidx.compose.ui.text.font.FontWeight weight);
- method public androidx.compose.ui.text.font.FontFamily component1();
- method public androidx.compose.ui.text.font.FontWeight component2();
- method public com.google.accompanist.themeadapter.core.FontFamilyWithWeight copy(androidx.compose.ui.text.font.FontFamily fontFamily, androidx.compose.ui.text.font.FontWeight weight);
- method public androidx.compose.ui.text.font.FontFamily getFontFamily();
- method public androidx.compose.ui.text.font.FontWeight getWeight();
+ @Deprecated public final class FontFamilyWithWeight {
+ ctor @Deprecated public FontFamilyWithWeight(androidx.compose.ui.text.font.FontFamily fontFamily, optional androidx.compose.ui.text.font.FontWeight weight);
+ method @Deprecated public androidx.compose.ui.text.font.FontFamily component1();
+ method @Deprecated public androidx.compose.ui.text.font.FontWeight component2();
+ method @Deprecated public com.google.accompanist.themeadapter.core.FontFamilyWithWeight copy(androidx.compose.ui.text.font.FontFamily fontFamily, androidx.compose.ui.text.font.FontWeight weight);
+ method @Deprecated public androidx.compose.ui.text.font.FontFamily getFontFamily();
+ method @Deprecated public androidx.compose.ui.text.font.FontWeight getWeight();
property public final androidx.compose.ui.text.font.FontFamily fontFamily;
property public final androidx.compose.ui.text.font.FontWeight weight;
}
public final class ResourceUtilsKt {
- method public static long parseColor(android.content.res.TypedArray, int index, optional long fallbackColor);
- method public static androidx.compose.foundation.shape.CornerSize? parseCornerSize(android.content.res.TypedArray, int index);
- method public static com.google.accompanist.themeadapter.core.FontFamilyWithWeight? parseFontFamily(android.content.res.TypedArray, int index);
- method public static androidx.compose.foundation.shape.CornerBasedShape parseShapeAppearance(android.content.Context context, @StyleRes int id, androidx.compose.ui.unit.LayoutDirection layoutDirection, androidx.compose.foundation.shape.CornerBasedShape fallbackShape);
- method public static androidx.compose.ui.text.TextStyle parseTextAppearance(android.content.Context context, @StyleRes int id, androidx.compose.ui.unit.Density density, boolean setTextColors, androidx.compose.ui.text.font.FontFamily? defaultFontFamily);
- method public static long parseTextUnit(android.content.res.TypedArray, int index, androidx.compose.ui.unit.Density density, optional long fallbackTextUnit);
- method @RequiresApi(23) public static androidx.compose.ui.text.font.FontFamily? parseXmlFontFamily(android.content.res.Resources, int id);
+ method @Deprecated public static long parseColor(android.content.res.TypedArray, int index, optional long fallbackColor);
+ method @Deprecated public static androidx.compose.foundation.shape.CornerSize? parseCornerSize(android.content.res.TypedArray, int index);
+ method @Deprecated public static com.google.accompanist.themeadapter.core.FontFamilyWithWeight? parseFontFamily(android.content.res.TypedArray, int index);
+ method @Deprecated public static androidx.compose.foundation.shape.CornerBasedShape parseShapeAppearance(android.content.Context context, @StyleRes int id, androidx.compose.ui.unit.LayoutDirection layoutDirection, androidx.compose.foundation.shape.CornerBasedShape fallbackShape);
+ method @Deprecated public static androidx.compose.ui.text.TextStyle parseTextAppearance(android.content.Context context, @StyleRes int id, androidx.compose.ui.unit.Density density, boolean setTextColors, androidx.compose.ui.text.font.FontFamily? defaultFontFamily);
+ method @Deprecated public static long parseTextUnit(android.content.res.TypedArray, int index, androidx.compose.ui.unit.Density density, optional long fallbackTextUnit);
+ method @Deprecated @RequiresApi(23) public static androidx.compose.ui.text.font.FontFamily? parseXmlFontFamily(android.content.res.Resources, int id);
}
}
diff --git a/themeadapter-core/src/main/java/com/google/accompanist/themeadapter/core/ResourceUtils.kt b/themeadapter-core/src/main/java/com/google/accompanist/themeadapter/core/ResourceUtils.kt
index e834b3c..2a96b70 100644
--- a/themeadapter-core/src/main/java/com/google/accompanist/themeadapter/core/ResourceUtils.kt
+++ b/themeadapter-core/src/main/java/com/google/accompanist/themeadapter/core/ResourceUtils.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.core
import android.annotation.SuppressLint
@@ -57,6 +59,12 @@
* @param fallbackColor Value to return if the attribute is not defined or can't be coerced to a
* [Color].
*/
+@Deprecated(
+ """
+ ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
public fun TypedArray.parseColor(
index: Int,
fallbackColor: Color = Color.Unspecified
@@ -71,6 +79,12 @@
* @param setTextColors Whether to read and set text colors from the style. Defaults to `false`.
* @param defaultFontFamily Optional default font family to use in [TextStyle]s.
*/
+@Deprecated(
+ """
+ ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
public fun parseTextAppearance(
context: Context,
@StyleRes id: Int,
@@ -165,6 +179,12 @@
*
* @param index Index of attribute to retrieve.
*/
+@Deprecated(
+ """
+ ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
public fun TypedArray.parseFontFamily(index: Int): FontFamilyWithWeight? {
val tv = tempTypedValue.getOrSet(::TypedValue)
if (getValue(index, tv) && tv.type == TypedValue.TYPE_STRING) {
@@ -200,6 +220,12 @@
/**
* A lightweight class for storing a [FontFamily] and [FontWeight].
*/
+@Deprecated(
+ """
+ ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
public data class FontFamilyWithWeight(
val fontFamily: FontFamily,
val weight: FontWeight = FontWeight.Normal
@@ -211,6 +237,12 @@
*
* @param id ID of XML resource to retrieve.
*/
+@Deprecated(
+ """
+ ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
@SuppressLint("RestrictedApi") // FontResourcesParserCompat.*
@RequiresApi(23)
// XML font families with > 1 fonts are only supported on API 23+
@@ -260,6 +292,12 @@
* @param fallbackTextUnit Value to return if the attribute is not defined or can't be coerced to a
* [TextUnit].
*/
+@Deprecated(
+ """
+ ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
public fun TypedArray.parseTextUnit(
index: Int,
density: Density,
@@ -290,6 +328,12 @@
* @param fallbackShape Value to return if the style resource ID is not defined or can't be coerced
* to a [CornerBasedShape].
*/
+@Deprecated(
+ """
+ ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
public fun parseShapeAppearance(
context: Context,
@StyleRes id: Int,
@@ -350,6 +394,12 @@
*
* @param index Index of attribute to retrieve.
*/
+@Deprecated(
+ """
+ ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-appcompat/
+"""
+)
public fun TypedArray.parseCornerSize(index: Int): CornerSize? {
val tv = tempTypedValue.getOrSet { TypedValue() }
if (getValue(index, tv)) {
diff --git a/themeadapter-material/api/current.api b/themeadapter-material/api/current.api
index c087c83..81cd24a 100644
--- a/themeadapter-material/api/current.api
+++ b/themeadapter-material/api/current.api
@@ -2,19 +2,19 @@
package com.google.accompanist.themeadapter.material {
public final class MdcTheme {
- method @androidx.compose.runtime.Composable public static void MdcTheme(optional android.content.Context context, optional boolean readColors, optional boolean readTypography, optional boolean readShapes, optional boolean setTextColors, optional boolean setDefaultFontFamily, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method public static com.google.accompanist.themeadapter.material.ThemeParameters createMdcTheme(android.content.Context context, androidx.compose.ui.unit.LayoutDirection layoutDirection, optional androidx.compose.ui.unit.Density density, optional boolean readColors, optional boolean readTypography, optional boolean readShapes, optional boolean setTextColors, optional boolean setDefaultFontFamily);
+ method @Deprecated @androidx.compose.runtime.Composable public static void MdcTheme(optional android.content.Context context, optional boolean readColors, optional boolean readTypography, optional boolean readShapes, optional boolean setTextColors, optional boolean setDefaultFontFamily, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @Deprecated public static com.google.accompanist.themeadapter.material.ThemeParameters createMdcTheme(android.content.Context context, androidx.compose.ui.unit.LayoutDirection layoutDirection, optional androidx.compose.ui.unit.Density density, optional boolean readColors, optional boolean readTypography, optional boolean readShapes, optional boolean setTextColors, optional boolean setDefaultFontFamily);
}
- public final class ThemeParameters {
- ctor public ThemeParameters(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography, androidx.compose.material.Shapes? shapes);
- method public androidx.compose.material.Colors? component1();
- method public androidx.compose.material.Typography? component2();
- method public androidx.compose.material.Shapes? component3();
- method public com.google.accompanist.themeadapter.material.ThemeParameters copy(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography, androidx.compose.material.Shapes? shapes);
- method public androidx.compose.material.Colors? getColors();
- method public androidx.compose.material.Shapes? getShapes();
- method public androidx.compose.material.Typography? getTypography();
+ @Deprecated public final class ThemeParameters {
+ ctor @Deprecated public ThemeParameters(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography, androidx.compose.material.Shapes? shapes);
+ method @Deprecated public androidx.compose.material.Colors? component1();
+ method @Deprecated public androidx.compose.material.Typography? component2();
+ method @Deprecated public androidx.compose.material.Shapes? component3();
+ method @Deprecated public com.google.accompanist.themeadapter.material.ThemeParameters copy(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography, androidx.compose.material.Shapes? shapes);
+ method @Deprecated public androidx.compose.material.Colors? getColors();
+ method @Deprecated public androidx.compose.material.Shapes? getShapes();
+ method @Deprecated public androidx.compose.material.Typography? getTypography();
property public final androidx.compose.material.Colors? colors;
property public final androidx.compose.material.Shapes? shapes;
property public final androidx.compose.material.Typography? typography;
diff --git a/themeadapter-material/src/androidTest/kotlin/com/google/accompanist/themeadapter/material/InstrumentedMdcThemeTest.kt b/themeadapter-material/src/androidTest/kotlin/com/google/accompanist/themeadapter/material/InstrumentedMdcThemeTest.kt
index 68f980c..e2f95f5 100644
--- a/themeadapter-material/src/androidTest/kotlin/com/google/accompanist/themeadapter/material/InstrumentedMdcThemeTest.kt
+++ b/themeadapter-material/src/androidTest/kotlin/com/google/accompanist/themeadapter/material/InstrumentedMdcThemeTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.material
import androidx.appcompat.app.AppCompatActivity
diff --git a/themeadapter-material/src/main/java/com/google/accompanist/themeadapter/material/MdcTheme.kt b/themeadapter-material/src/main/java/com/google/accompanist/themeadapter/material/MdcTheme.kt
index 85594a3..e0b8212 100644
--- a/themeadapter-material/src/main/java/com/google/accompanist/themeadapter/material/MdcTheme.kt
+++ b/themeadapter-material/src/main/java/com/google/accompanist/themeadapter/material/MdcTheme.kt
@@ -15,6 +15,7 @@
*/
@file:JvmName("MdcTheme")
+@file:Suppress("DEPRECATION")
package com.google.accompanist.themeadapter.material
@@ -72,6 +73,12 @@
* @param setDefaultFontFamily whether to read and prioritize the `fontFamily` attributes from
* [context]'s theme, over any specified in the MDC text appearances. Defaults to `false`.
*/
+@Deprecated(
+ """
+ Material ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-material/
+"""
+)
@Composable
public fun MdcTheme(
context: Context = LocalContext.current,
@@ -123,6 +130,12 @@
* This class contains the individual components of a [MaterialTheme]: [Colors], [Typography]
* and [Shapes].
*/
+@Deprecated(
+ """
+ Material ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-material/
+"""
+)
public data class ThemeParameters(
val colors: Colors?,
val typography: Typography?,
@@ -159,6 +172,12 @@
* @return [ThemeParameters] instance containing the resulting [Colors], [Typography]
* and [Shapes].
*/
+@Deprecated(
+ """
+ Material ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-material/
+"""
+)
public fun createMdcTheme(
context: Context,
layoutDirection: LayoutDirection,
diff --git a/themeadapter-material/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material/BaseMdcThemeTest.kt b/themeadapter-material/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material/BaseMdcThemeTest.kt
index a5722cb..b4b77fd 100644
--- a/themeadapter-material/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material/BaseMdcThemeTest.kt
+++ b/themeadapter-material/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material/BaseMdcThemeTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.material
import android.view.ContextThemeWrapper
diff --git a/themeadapter-material/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material/NotMdcThemeTest.kt b/themeadapter-material/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material/NotMdcThemeTest.kt
index be7bc1d..076f86f 100644
--- a/themeadapter-material/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material/NotMdcThemeTest.kt
+++ b/themeadapter-material/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material/NotMdcThemeTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.material
import androidx.compose.ui.test.junit4.createAndroidComposeRule
diff --git a/themeadapter-material3/api/current.api b/themeadapter-material3/api/current.api
index 1aac4b9..44544ea 100644
--- a/themeadapter-material3/api/current.api
+++ b/themeadapter-material3/api/current.api
@@ -2,19 +2,19 @@
package com.google.accompanist.themeadapter.material3 {
public final class Mdc3Theme {
- method @androidx.compose.runtime.Composable public static void Mdc3Theme(optional android.content.Context context, optional boolean readColorScheme, optional boolean readTypography, optional boolean readShapes, optional boolean setTextColors, optional boolean setDefaultFontFamily, kotlin.jvm.functions.Function0<kotlin.Unit> content);
- method public static com.google.accompanist.themeadapter.material3.Theme3Parameters createMdc3Theme(android.content.Context context, androidx.compose.ui.unit.LayoutDirection layoutDirection, optional androidx.compose.ui.unit.Density density, optional boolean readColorScheme, optional boolean readTypography, optional boolean readShapes, optional boolean setTextColors, optional boolean setDefaultFontFamily);
+ method @Deprecated @androidx.compose.runtime.Composable public static void Mdc3Theme(optional android.content.Context context, optional boolean readColorScheme, optional boolean readTypography, optional boolean readShapes, optional boolean setTextColors, optional boolean setDefaultFontFamily, kotlin.jvm.functions.Function0<kotlin.Unit> content);
+ method @Deprecated public static com.google.accompanist.themeadapter.material3.Theme3Parameters createMdc3Theme(android.content.Context context, androidx.compose.ui.unit.LayoutDirection layoutDirection, optional androidx.compose.ui.unit.Density density, optional boolean readColorScheme, optional boolean readTypography, optional boolean readShapes, optional boolean setTextColors, optional boolean setDefaultFontFamily);
}
- public final class Theme3Parameters {
- ctor public Theme3Parameters(androidx.compose.material3.ColorScheme? colorScheme, androidx.compose.material3.Typography? typography, androidx.compose.material3.Shapes? shapes);
- method public androidx.compose.material3.ColorScheme? component1();
- method public androidx.compose.material3.Typography? component2();
- method public androidx.compose.material3.Shapes? component3();
- method public com.google.accompanist.themeadapter.material3.Theme3Parameters copy(androidx.compose.material3.ColorScheme? colorScheme, androidx.compose.material3.Typography? typography, androidx.compose.material3.Shapes? shapes);
- method public androidx.compose.material3.ColorScheme? getColorScheme();
- method public androidx.compose.material3.Shapes? getShapes();
- method public androidx.compose.material3.Typography? getTypography();
+ @Deprecated public final class Theme3Parameters {
+ ctor @Deprecated public Theme3Parameters(androidx.compose.material3.ColorScheme? colorScheme, androidx.compose.material3.Typography? typography, androidx.compose.material3.Shapes? shapes);
+ method @Deprecated public androidx.compose.material3.ColorScheme? component1();
+ method @Deprecated public androidx.compose.material3.Typography? component2();
+ method @Deprecated public androidx.compose.material3.Shapes? component3();
+ method @Deprecated public com.google.accompanist.themeadapter.material3.Theme3Parameters copy(androidx.compose.material3.ColorScheme? colorScheme, androidx.compose.material3.Typography? typography, androidx.compose.material3.Shapes? shapes);
+ method @Deprecated public androidx.compose.material3.ColorScheme? getColorScheme();
+ method @Deprecated public androidx.compose.material3.Shapes? getShapes();
+ method @Deprecated public androidx.compose.material3.Typography? getTypography();
property public final androidx.compose.material3.ColorScheme? colorScheme;
property public final androidx.compose.material3.Shapes? shapes;
property public final androidx.compose.material3.Typography? typography;
diff --git a/themeadapter-material3/src/androidTest/kotlin/com/google/accompanist/themeadapter/material3/InstrumentedMdc3ThemeTest.kt b/themeadapter-material3/src/androidTest/kotlin/com/google/accompanist/themeadapter/material3/InstrumentedMdc3ThemeTest.kt
index ff7eeff..8e301bd 100644
--- a/themeadapter-material3/src/androidTest/kotlin/com/google/accompanist/themeadapter/material3/InstrumentedMdc3ThemeTest.kt
+++ b/themeadapter-material3/src/androidTest/kotlin/com/google/accompanist/themeadapter/material3/InstrumentedMdc3ThemeTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.material3
import androidx.appcompat.app.AppCompatActivity
diff --git a/themeadapter-material3/src/main/java/com/google/accompanist/themeadapter/material3/Mdc3Theme.kt b/themeadapter-material3/src/main/java/com/google/accompanist/themeadapter/material3/Mdc3Theme.kt
index 1fb5d0e..90c11c0 100644
--- a/themeadapter-material3/src/main/java/com/google/accompanist/themeadapter/material3/Mdc3Theme.kt
+++ b/themeadapter-material3/src/main/java/com/google/accompanist/themeadapter/material3/Mdc3Theme.kt
@@ -15,6 +15,7 @@
*/
@file:JvmName("Mdc3Theme")
+@file:Suppress("DEPRECATION")
package com.google.accompanist.themeadapter.material3
@@ -65,6 +66,12 @@
* @param setDefaultFontFamily whether to read and prioritize the `fontFamily` attributes from
* [context]'s theme, over any specified in the MDC text appearances. Defaults to `false`.
*/
+@Deprecated(
+ """
+ Material ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-material/
+"""
+)
@Composable
public fun Mdc3Theme(
context: Context = LocalContext.current,
@@ -116,6 +123,12 @@
* This class contains the individual components of a [MaterialTheme]: [ColorScheme] and
* [Typography].
*/
+@Deprecated(
+ """
+ Material ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-material/
+"""
+)
public data class Theme3Parameters(
val colorScheme: ColorScheme?,
val typography: Typography?,
@@ -151,6 +164,12 @@
* [context]'s theme, over any specified in the MDC text appearances. Defaults to `false`.
* @return [Theme3Parameters] instance containing the resulting [ColorScheme] and [Typography].
*/
+@Deprecated(
+ """
+ Material ThemeAdapter is deprecated.
+For more migration information, please visit https://google.github.io/accompanist/themeadapter-material/
+"""
+)
public fun createMdc3Theme(
context: Context,
layoutDirection: LayoutDirection,
diff --git a/themeadapter-material3/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material3/BaseMdc3ThemeTest.kt b/themeadapter-material3/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material3/BaseMdc3ThemeTest.kt
index e65fce1..9a31aec 100644
--- a/themeadapter-material3/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material3/BaseMdc3ThemeTest.kt
+++ b/themeadapter-material3/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material3/BaseMdc3ThemeTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.material3
import androidx.appcompat.app.AppCompatActivity
diff --git a/themeadapter-material3/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material3/NotMdc3ThemeTest.kt b/themeadapter-material3/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material3/NotMdc3ThemeTest.kt
index 5f1de8e..4df6d21 100644
--- a/themeadapter-material3/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material3/NotMdc3ThemeTest.kt
+++ b/themeadapter-material3/src/sharedTest/kotlin/com/google/accompanist/themeadapter/material3/NotMdc3ThemeTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.themeadapter.material3
import androidx.compose.ui.test.junit4.createAndroidComposeRule
diff --git a/web/api/current.api b/web/api/current.api
index f91b42b..87bfce4 100644
--- a/web/api/current.api
+++ b/web/api/current.api
@@ -1,59 +1,59 @@
// Signature format: 4.0
package com.google.accompanist.web {
- public class AccompanistWebChromeClient extends android.webkit.WebChromeClient {
- ctor public AccompanistWebChromeClient();
- method public com.google.accompanist.web.WebViewState getState();
+ @Deprecated public class AccompanistWebChromeClient extends android.webkit.WebChromeClient {
+ ctor @Deprecated public AccompanistWebChromeClient();
+ method @Deprecated public com.google.accompanist.web.WebViewState getState();
property public com.google.accompanist.web.WebViewState state;
- field public com.google.accompanist.web.WebViewState state;
+ field @Deprecated public com.google.accompanist.web.WebViewState state;
}
- public class AccompanistWebViewClient extends android.webkit.WebViewClient {
- ctor public AccompanistWebViewClient();
- method public com.google.accompanist.web.WebViewNavigator getNavigator();
- method public com.google.accompanist.web.WebViewState getState();
+ @Deprecated public class AccompanistWebViewClient extends android.webkit.WebViewClient {
+ ctor @Deprecated public AccompanistWebViewClient();
+ method @Deprecated public com.google.accompanist.web.WebViewNavigator getNavigator();
+ method @Deprecated public com.google.accompanist.web.WebViewState getState();
property public com.google.accompanist.web.WebViewNavigator navigator;
property public com.google.accompanist.web.WebViewState state;
- field public com.google.accompanist.web.WebViewNavigator navigator;
- field public com.google.accompanist.web.WebViewState state;
+ field @Deprecated public com.google.accompanist.web.WebViewNavigator navigator;
+ field @Deprecated public com.google.accompanist.web.WebViewState state;
}
- public abstract sealed class LoadingState {
+ @Deprecated public abstract sealed class LoadingState {
}
- public static final class LoadingState.Finished extends com.google.accompanist.web.LoadingState {
- field public static final com.google.accompanist.web.LoadingState.Finished INSTANCE;
+ @Deprecated public static final class LoadingState.Finished extends com.google.accompanist.web.LoadingState {
+ field @Deprecated public static final com.google.accompanist.web.LoadingState.Finished INSTANCE;
}
- public static final class LoadingState.Initializing extends com.google.accompanist.web.LoadingState {
- field public static final com.google.accompanist.web.LoadingState.Initializing INSTANCE;
+ @Deprecated public static final class LoadingState.Initializing extends com.google.accompanist.web.LoadingState {
+ field @Deprecated public static final com.google.accompanist.web.LoadingState.Initializing INSTANCE;
}
- public static final class LoadingState.Loading extends com.google.accompanist.web.LoadingState {
- ctor public LoadingState.Loading(float progress);
- method public float component1();
- method public com.google.accompanist.web.LoadingState.Loading copy(float progress);
- method public float getProgress();
+ @Deprecated public static final class LoadingState.Loading extends com.google.accompanist.web.LoadingState {
+ ctor @Deprecated public LoadingState.Loading(float progress);
+ method @Deprecated public float component1();
+ method @Deprecated public com.google.accompanist.web.LoadingState.Loading copy(float progress);
+ method @Deprecated public float getProgress();
property public final float progress;
}
- public abstract sealed class WebContent {
+ @Deprecated public abstract sealed class WebContent {
method @Deprecated public final String? getCurrentUrl();
}
- public static final class WebContent.Data extends com.google.accompanist.web.WebContent {
- ctor public WebContent.Data(String data, optional String? baseUrl, optional String encoding, optional String? mimeType, optional String? historyUrl);
- method public String component1();
- method public String? component2();
- method public String component3();
- method public String? component4();
- method public String? component5();
- method public com.google.accompanist.web.WebContent.Data copy(String data, String? baseUrl, String encoding, String? mimeType, String? historyUrl);
- method public String? getBaseUrl();
- method public String getData();
- method public String getEncoding();
- method public String? getHistoryUrl();
- method public String? getMimeType();
+ @Deprecated public static final class WebContent.Data extends com.google.accompanist.web.WebContent {
+ ctor @Deprecated public WebContent.Data(String data, optional String? baseUrl, optional String encoding, optional String? mimeType, optional String? historyUrl);
+ method @Deprecated public String component1();
+ method @Deprecated public String? component2();
+ method @Deprecated public String component3();
+ method @Deprecated public String? component4();
+ method @Deprecated public String? component5();
+ method @Deprecated public com.google.accompanist.web.WebContent.Data copy(String data, String? baseUrl, String encoding, String? mimeType, String? historyUrl);
+ method @Deprecated public String? getBaseUrl();
+ method @Deprecated public String getData();
+ method @Deprecated public String getEncoding();
+ method @Deprecated public String? getHistoryUrl();
+ method @Deprecated public String? getMimeType();
property public final String? baseUrl;
property public final String data;
property public final String encoding;
@@ -61,68 +61,81 @@
property public final String? mimeType;
}
- public static final class WebContent.NavigatorOnly extends com.google.accompanist.web.WebContent {
- field public static final com.google.accompanist.web.WebContent.NavigatorOnly INSTANCE;
+ @Deprecated public static final class WebContent.NavigatorOnly extends com.google.accompanist.web.WebContent {
+ field @Deprecated public static final com.google.accompanist.web.WebContent.NavigatorOnly INSTANCE;
}
- public static final class WebContent.Url extends com.google.accompanist.web.WebContent {
- ctor public WebContent.Url(String url, optional java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders);
- method public String component1();
- method public java.util.Map<java.lang.String,java.lang.String> component2();
- method public com.google.accompanist.web.WebContent.Url copy(String url, java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders);
- method public java.util.Map<java.lang.String,java.lang.String> getAdditionalHttpHeaders();
- method public String getUrl();
+ @Deprecated public static final class WebContent.Post extends com.google.accompanist.web.WebContent {
+ ctor @Deprecated public WebContent.Post(String url, byte[] postData);
+ method @Deprecated public String component1();
+ method @Deprecated public byte[] component2();
+ method @Deprecated public com.google.accompanist.web.WebContent.Post copy(String url, byte[] postData);
+ method @Deprecated public byte[] getPostData();
+ method @Deprecated public String getUrl();
+ property public final byte[] postData;
+ property public final String url;
+ }
+
+ @Deprecated public static final class WebContent.Url extends com.google.accompanist.web.WebContent {
+ ctor @Deprecated public WebContent.Url(String url, optional java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders);
+ method @Deprecated public String component1();
+ method @Deprecated public java.util.Map<java.lang.String,java.lang.String> component2();
+ method @Deprecated public com.google.accompanist.web.WebContent.Url copy(String url, java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders);
+ method @Deprecated public java.util.Map<java.lang.String,java.lang.String> getAdditionalHttpHeaders();
+ method @Deprecated public String getUrl();
property public final java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders;
property public final String url;
}
- @androidx.compose.runtime.Immutable public final class WebViewError {
- ctor public WebViewError(android.webkit.WebResourceRequest? request, android.webkit.WebResourceError error);
- method public android.webkit.WebResourceRequest? component1();
- method public android.webkit.WebResourceError component2();
- method public com.google.accompanist.web.WebViewError copy(android.webkit.WebResourceRequest? request, android.webkit.WebResourceError error);
- method public android.webkit.WebResourceError getError();
- method public android.webkit.WebResourceRequest? getRequest();
+ @Deprecated @androidx.compose.runtime.Immutable public final class WebViewError {
+ ctor @Deprecated public WebViewError(android.webkit.WebResourceRequest? request, android.webkit.WebResourceError error);
+ method @Deprecated public android.webkit.WebResourceRequest? component1();
+ method @Deprecated public android.webkit.WebResourceError component2();
+ method @Deprecated public com.google.accompanist.web.WebViewError copy(android.webkit.WebResourceRequest? request, android.webkit.WebResourceError error);
+ method @Deprecated public android.webkit.WebResourceError getError();
+ method @Deprecated public android.webkit.WebResourceRequest? getRequest();
property public final android.webkit.WebResourceError error;
property public final android.webkit.WebResourceRequest? request;
}
public final class WebViewKt {
- method @androidx.compose.runtime.Composable public static void WebView(com.google.accompanist.web.WebViewState state, optional androidx.compose.ui.Modifier modifier, optional boolean captureBackPresses, optional com.google.accompanist.web.WebViewNavigator navigator, optional kotlin.jvm.functions.Function1<? super android.webkit.WebView,kotlin.Unit> onCreated, optional kotlin.jvm.functions.Function1<? super android.webkit.WebView,kotlin.Unit> onDispose, optional com.google.accompanist.web.AccompanistWebViewClient client, optional com.google.accompanist.web.AccompanistWebChromeClient chromeClient, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends android.webkit.WebView>? factory);
- method @androidx.compose.runtime.Composable public static void WebView(com.google.accompanist.web.WebViewState state, android.widget.FrameLayout.LayoutParams layoutParams, optional androidx.compose.ui.Modifier modifier, optional boolean captureBackPresses, optional com.google.accompanist.web.WebViewNavigator navigator, optional kotlin.jvm.functions.Function1<? super android.webkit.WebView,kotlin.Unit> onCreated, optional kotlin.jvm.functions.Function1<? super android.webkit.WebView,kotlin.Unit> onDispose, optional com.google.accompanist.web.AccompanistWebViewClient client, optional com.google.accompanist.web.AccompanistWebChromeClient chromeClient, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends android.webkit.WebView>? factory);
- method public static androidx.compose.runtime.saveable.Saver<com.google.accompanist.web.WebViewState,java.lang.Object> getWebStateSaver();
- method @androidx.compose.runtime.Composable public static com.google.accompanist.web.WebViewState rememberSaveableWebViewState();
- method @androidx.compose.runtime.Composable public static com.google.accompanist.web.WebViewNavigator rememberWebViewNavigator(optional kotlinx.coroutines.CoroutineScope coroutineScope);
- method @androidx.compose.runtime.Composable public static com.google.accompanist.web.WebViewState rememberWebViewState(String url, optional java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders);
- method @androidx.compose.runtime.Composable public static com.google.accompanist.web.WebViewState rememberWebViewStateWithHTMLData(String data, optional String? baseUrl, optional String encoding, optional String? mimeType, optional String? historyUrl);
- property public static final androidx.compose.runtime.saveable.Saver<com.google.accompanist.web.WebViewState,java.lang.Object> WebStateSaver;
+ method @Deprecated @androidx.compose.runtime.Composable public static void WebView(com.google.accompanist.web.WebViewState state, optional androidx.compose.ui.Modifier modifier, optional boolean captureBackPresses, optional com.google.accompanist.web.WebViewNavigator navigator, optional kotlin.jvm.functions.Function1<? super android.webkit.WebView,kotlin.Unit> onCreated, optional kotlin.jvm.functions.Function1<? super android.webkit.WebView,kotlin.Unit> onDispose, optional com.google.accompanist.web.AccompanistWebViewClient client, optional com.google.accompanist.web.AccompanistWebChromeClient chromeClient, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends android.webkit.WebView>? factory);
+ method @Deprecated @androidx.compose.runtime.Composable public static void WebView(com.google.accompanist.web.WebViewState state, android.widget.FrameLayout.LayoutParams layoutParams, optional androidx.compose.ui.Modifier modifier, optional boolean captureBackPresses, optional com.google.accompanist.web.WebViewNavigator navigator, optional kotlin.jvm.functions.Function1<? super android.webkit.WebView,kotlin.Unit> onCreated, optional kotlin.jvm.functions.Function1<? super android.webkit.WebView,kotlin.Unit> onDispose, optional com.google.accompanist.web.AccompanistWebViewClient client, optional com.google.accompanist.web.AccompanistWebChromeClient chromeClient, optional kotlin.jvm.functions.Function1<? super android.content.Context,? extends android.webkit.WebView>? factory);
+ method @Deprecated public static androidx.compose.runtime.saveable.Saver<com.google.accompanist.web.WebViewState,java.lang.Object> getWebStateSaver();
+ method @Deprecated @androidx.compose.runtime.Composable public static com.google.accompanist.web.WebViewState rememberSaveableWebViewState();
+ method @Deprecated @androidx.compose.runtime.Composable public static com.google.accompanist.web.WebViewNavigator rememberWebViewNavigator(optional kotlinx.coroutines.CoroutineScope coroutineScope);
+ method @Deprecated @androidx.compose.runtime.Composable public static com.google.accompanist.web.WebViewState rememberWebViewState(String url, optional java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders);
+ method @Deprecated @androidx.compose.runtime.Composable public static com.google.accompanist.web.WebViewState rememberWebViewState(String url, byte[] postData);
+ method @Deprecated @androidx.compose.runtime.Composable public static com.google.accompanist.web.WebViewState rememberWebViewStateWithHTMLData(String data, optional String? baseUrl, optional String encoding, optional String? mimeType, optional String? historyUrl);
+ property @Deprecated public static final androidx.compose.runtime.saveable.Saver<com.google.accompanist.web.WebViewState,java.lang.Object> WebStateSaver;
}
- @androidx.compose.runtime.Stable public final class WebViewNavigator {
- ctor public WebViewNavigator(kotlinx.coroutines.CoroutineScope coroutineScope);
- method public boolean getCanGoBack();
- method public boolean getCanGoForward();
- method public void loadHtml(String html, optional String? baseUrl, optional String? mimeType, optional String? encoding, optional String? historyUrl);
- method public void loadUrl(String url, optional java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders);
- method public void navigateBack();
- method public void navigateForward();
- method public void reload();
- method public void stopLoading();
+ @Deprecated @androidx.compose.runtime.Stable public final class WebViewNavigator {
+ ctor @Deprecated public WebViewNavigator(kotlinx.coroutines.CoroutineScope coroutineScope);
+ method @Deprecated public boolean getCanGoBack();
+ method @Deprecated public boolean getCanGoForward();
+ method @Deprecated public void loadHtml(String html, optional String? baseUrl, optional String? mimeType, optional String? encoding, optional String? historyUrl);
+ method @Deprecated public void loadUrl(String url, optional java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders);
+ method @Deprecated public void navigateBack();
+ method @Deprecated public void navigateForward();
+ method @Deprecated public void postUrl(String url, byte[] postData);
+ method @Deprecated public void reload();
+ method @Deprecated public void stopLoading();
property public final boolean canGoBack;
property public final boolean canGoForward;
}
- @androidx.compose.runtime.Stable public final class WebViewState {
- ctor public WebViewState(com.google.accompanist.web.WebContent webContent);
- method public com.google.accompanist.web.WebContent getContent();
- method public androidx.compose.runtime.snapshots.SnapshotStateList<com.google.accompanist.web.WebViewError> getErrorsForCurrentRequest();
- method public String? getLastLoadedUrl();
- method public com.google.accompanist.web.LoadingState getLoadingState();
- method public android.graphics.Bitmap? getPageIcon();
- method public String? getPageTitle();
- method public android.os.Bundle? getViewState();
- method public boolean isLoading();
- method public void setContent(com.google.accompanist.web.WebContent);
+ @Deprecated @androidx.compose.runtime.Stable public final class WebViewState {
+ ctor @Deprecated public WebViewState(com.google.accompanist.web.WebContent webContent);
+ method @Deprecated public com.google.accompanist.web.WebContent getContent();
+ method @Deprecated public androidx.compose.runtime.snapshots.SnapshotStateList<com.google.accompanist.web.WebViewError> getErrorsForCurrentRequest();
+ method @Deprecated public String? getLastLoadedUrl();
+ method @Deprecated public com.google.accompanist.web.LoadingState getLoadingState();
+ method @Deprecated public android.graphics.Bitmap? getPageIcon();
+ method @Deprecated public String? getPageTitle();
+ method @Deprecated public android.os.Bundle? getViewState();
+ method @Deprecated public boolean isLoading();
+ method @Deprecated public void setContent(com.google.accompanist.web.WebContent);
property public final com.google.accompanist.web.WebContent content;
property public final androidx.compose.runtime.snapshots.SnapshotStateList<com.google.accompanist.web.WebViewError> errorsForCurrentRequest;
property public final boolean isLoading;
diff --git a/web/src/androidTest/kotlin/com/google/accompanist/web/WebTest.kt b/web/src/androidTest/kotlin/com/google/accompanist/web/WebTest.kt
index a256d2f..1d08492 100644
--- a/web/src/androidTest/kotlin/com/google/accompanist/web/WebTest.kt
+++ b/web/src/androidTest/kotlin/com/google/accompanist/web/WebTest.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.web
import android.content.Context
diff --git a/web/src/main/java/com/google/accompanist/web/WebView.kt b/web/src/main/java/com/google/accompanist/web/WebView.kt
index 7dc83be..2286a0b 100644
--- a/web/src/main/java/com/google/accompanist/web/WebView.kt
+++ b/web/src/main/java/com/google/accompanist/web/WebView.kt
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+@file:Suppress("DEPRECATION")
+
package com.google.accompanist.web
import android.content.Context
@@ -78,6 +80,13 @@
* @param factory An optional WebView factory for using a custom subclass of WebView
* @sample com.google.accompanist.sample.webview.BasicWebViewSample
*/
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
@Composable
public fun WebView(
state: WebViewState,
@@ -150,6 +159,13 @@
* @param chromeClient Provides access to WebChromeClient via subclassing
* @param factory An optional WebView factory for using a custom subclass of WebView
*/
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
@Composable
public fun WebView(
state: WebViewState,
@@ -245,6 +261,13 @@
* As Accompanist Web needs to set its own web client to function, it provides this intermediary
* class that can be overriden if further custom behaviour is required.
*/
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public open class AccompanistWebViewClient : WebViewClient() {
public open lateinit var state: WebViewState
internal set
@@ -294,6 +317,13 @@
* As Accompanist Web needs to set its own web client to function, it provides this intermediary
* class that can be overriden if further custom behaviour is required.
*/
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public open class AccompanistWebChromeClient : WebChromeClient() {
public open lateinit var state: WebViewState
internal set
@@ -315,6 +345,13 @@
}
}
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public sealed class WebContent {
public data class Url(
val url: String,
@@ -374,6 +411,13 @@
* Sealed class for constraining possible loading states.
* See [Loading] and [Finished].
*/
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public sealed class LoadingState {
/**
* Describes a WebView that has not yet loaded for the first time.
@@ -396,6 +440,13 @@
* A state holder to hold the state for the WebView. In most cases this will be remembered
* using the rememberWebViewState(uri) function.
*/
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
@Stable
public class WebViewState(webContent: WebContent) {
public var lastLoadedUrl: String? by mutableStateOf(null)
@@ -458,6 +509,13 @@
* @see [rememberWebViewNavigator]
*/
@Stable
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public class WebViewNavigator(private val coroutineScope: CoroutineScope) {
private sealed interface NavigationEvent {
object Back : NavigationEvent
@@ -622,6 +680,13 @@
* override.
*/
@Composable
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public fun rememberWebViewNavigator(
coroutineScope: CoroutineScope = rememberCoroutineScope()
): WebViewNavigator = remember(coroutineScope) { WebViewNavigator(coroutineScope) }
@@ -630,6 +695,13 @@
* A wrapper class to hold errors from the WebView.
*/
@Immutable
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public data class WebViewError(
/**
* The request the error came from.
@@ -649,6 +721,13 @@
* Note that these headers are used for all subsequent requests of the WebView.
*/
@Composable
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public fun rememberWebViewState(
url: String,
additionalHttpHeaders: Map<String, String> = emptyMap()
@@ -675,6 +754,13 @@
* @param data The uri to load in the WebView
*/
@Composable
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public fun rememberWebViewStateWithHTMLData(
data: String,
baseUrl: String? = null,
@@ -697,6 +783,13 @@
* @param postData The data to be posted to the WebView with the url
*/
@Composable
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public fun rememberWebViewState(
url: String,
postData: ByteArray
@@ -727,11 +820,25 @@
* @sample com.google.accompanist.sample.webview.WebViewSaveStateSample
*/
@Composable
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public fun rememberSaveableWebViewState(): WebViewState =
rememberSaveable(saver = WebStateSaver) {
WebViewState(WebContent.NavigatorOnly)
}
+@Deprecated(
+ """
+accompanist/web is deprecated and the API is no longer maintained.
+We recommend forking the implementation and customising it to your needs.
+For more information please visit https://google.github.io/accompanist/web
+"""
+)
public val WebStateSaver: Saver<WebViewState, Any> = run {
val pageTitleKey = "pagetitle"
val lastLoadedUrlKey = "lastloaded"